I recommend simple city bus. The ticket costs
2,15 EUR and takes you directly to the city center. It's the
Line 46 bus - Pl. Espanya / Aeroport BCN. I took it a few times and it was always ok.
Of course, taxi will be faster, as it doesn't have million of stops. It costs between
30-40 euros ( depends day or night). It's a good idea for 3-4 people, then you pay around 10 euros which is not that bad. And takes you directly to your hotel.
There is also another private bus
Aero Bus. It's faster that public one and costs around
6 euros.
I hope I helped