This fall I flew into Nice, stayed near there for 6 nights in Villefranche sur Mer, then flew to BCN on Veuling, one of the cheap airlines where I had few days before joining a tour of Spain (the RS Best of Spain). When I landed in BCN, I took the train to Girona, where I spent one night seeing the sights. I could have spent 2 nights there as it was a marvellous little town with so much history.
I spent 5 night in BCN before the tour began. 2 days I took Viator tours. One was to Montserrat and a Cava winery and another to Tarragona and Sitges. Both day trips were great. Tarragona has many Roman sites; the tour took us to an Aqueduct outside the city which was absolutely lovely. It would have been difficult to get to on my own.
In BCN, many sites require advance tickets, easy to purchase online. Park Guell and touring the Palau Musica were 2 of them. One of the smaller Gaudi sites I walked into and waited only a few minutes in line but I passed another house which had a long line up. Sagrada Familia was included in my tour but I am certain advance tickets would be required; it was VERY busy. It was absolutely outstanding.
I think 2 places would be best for a holiday of that time frame, perhaps taking day trips if you are able. Moving from one place to another is time consuming and tiring; it always seems to take more time than expected. I took a trip to Italy and travelled on my own to Venice, Florence and Rome; the travel between cities days took a lot of time much more than I thought.
Enjoy your trip.