Barcelona Airport is open 24 hours. In such cases, many travellers find it more convenient to stay in a hotel near the airport so that they don't have to deal with transport to/from the city in the late or early hours.
Hotels at the airport
There is only 1 hotel directly at the airport.
- Sleep&Fly directly in Terminal 1 (business area) without having to deal with any transportation
Hotels nearby
The following hotels are available in close proximity to the airport with their own free shuttle service:
- Hotel Barcelona Aeropuerto by Meliá about 3 minutes by minibus from Terminal 2 and 5 minutes from Terminal 1
- Frontair Congress Aeropuerto approx. 15 minutes by minibus from the airport, usually the cheapest quality hotel near the airport, however, its disadvantage is a more difficult transport to the centre of Barcelona, however, you can solve this by taking the hotel's free shuttle both ways and going to/from the centre to the airport.
Other hotels around the airport either have their own shuttle service to the terminals for a fee, or you can just take a taxi.
Given the possibility of an all-night public transport from the airport to Barcelona city centre, it is better to choose a hotel directly in Barcelona.