Are you arriving in Girona, by ryanair? If you are, I believe that there is a bus service that takes you to Barcelona. I think their main business are people flying ryanair. There are two major bus stations in Barcelona, I think it stops at either or both stations. From there, I think there is a bus that goes to Barcelona Airport. If not, for sure I know there's a bus from Plaza de Espana to the airport.