Took me bloody ages to find this, hope it helps someone else. Bottom line is, there's buses from the airport pretty much all the time, longest wait is 15 mins (that's me!).
I think there are two "relevant" stops, Gracia and Catalunya - (the first is nearer our apt), the second is right on the Ramblas.
The cost is 3.90€ one way, buy it on the bus (6.70€ return). If you get in before 9pm you can buy a "barcelona card" at the information centre, from 2 - 5 days. 5 days works out ok. Free (public) transport anywhere anytime.
Hope that's useful :)