Armed police are attending the incident at the Hotel Petit Palace in Carre de la Boqueria. There were no serious injuries or structural damage, police said.
Officers added that the cause is thought to have been the use of pyrotechnics in the street.
Catalonia Police’s Twitter account posted: “We are working on an open incident in Ciutat Vella for a detonation in a building whose causes are being investigated.
“There are no serious injuries or structural damage.”
In a later update, police confirmed that a terror attack had been ruled out.
They posted: “A terrorist attack is ruled out and the main hypothesis indicates that it could be the use of pyrotechnics in the street.”
Spanish journalist Emili Puig said a “loud” explosion was heard inside the hotel.
People were evacuated from the building following the explosion.
A video shared on social media shows the area cordoned off as crowds gather.
Multiple emergency services vehicles can also be seen.