Barcelona has a huge supply of accommodation thanks to the tourism boom of the last 15 years. While at one point there was a distinct lack of hotel rooms, the city now has more than enough accommodation. Some hotels are purpose built but former palaces have also been converted to provide luxury accommodation. The only time the city is at capacity these days is for the Mobile Phone Congress, the annual event that sees the likes of Mark Zuckerberg in the city.
Areas that had few hotels in the past have seen hotels (and that hybrid, the aparthotel) spring up in the middle of nowhere, such as near Sants station. You can search for hotels on Kayak.com.
But hotels are not the only option for accommodation. Firstly there are hostals, offering more basic accommodation. These are not to be confused with hostels. And youth hostels cater mainly to the young and to backpackers from around the world. Expect shared rooms and minimum facilities, but they are cheap and you get the chance to meet other young travellers and make new friends.
There are also many tourist apartments, but you need to be careful.
Many, if not most, are unlicensed and the city council is clamping down on them. And with good reason, as they are often in residential buildings and the neighbours don’t appreciate tourists partying until the small hours every night they are there.
And because of the ease of getting around, it may not matter too much what area you stay as long as it is close to the metro. However, if you are in Barcelona for a very particular reason, such as watching the football, you may want to book accommodation nearly (see the list of hotels near Camp Nou for example).
For general tourism, the Barri Gòtic is always a good choice, with a maze of narrow mediaeval streets to explore. The city walls date from Roman times and there is always plenty to see and do during day or night. But while the Ramblas can be a good location, make sure your hotel is located towards Plaça Catalunya. The bottom end closest the port becomes a red light district at night and uncomfortable to walk in the early hours.
Some good hotels in classic style include the Majestic and Casa Fuster, both on Passeig de Gràcia, and Hotel 1898 on the Ramblas. Modern hotels include Hotel Arts and W Barcelona (photo above), built in the shape of a sail right on reclaimed land right at the entrance to the harbour.