Abu Nayeem, the fire department chief, said the fire had been caused by an electrical fault and spread rapidly before firefighters could access the area.
Many of the victims were attending a wedding on the roof of one of the buildings.
"At least seven buildings have been engulfed by the fire. There were shops selling chemicals on the ground floor, which were caught by the fire as it spread very quickly," he told the AFP news agency on Thursday.
"The temperature and fumes became unbearable because of the chemicals."
Abu Nayeem said a bakery with several large gas burners had also caught fire.
"We struggled to get inside due to the narrow stairways of the very old buildings, it is almost impossible for us to get fire-fighting equipment into the area," he said.
Fire officials have been criticised for their slow response to the blaze.
"The fire raged for more than an hour before firefighters arrived," our correspondent said.
"People are very angry."
Shahidul Bari, a specialist at the burns unit, said that at least 100 people had been admitted with severe burns and smoke inhalation.
"Our unit is full and more patients are pouring in. It's a disaster of huge proportions," he said.
"Patients are being treated in the corridors and still more are coming in. We are sending the most critically ill to the hospital's emergency units."
Fires due to short-circuits, substandard wiring and electrical faults are common in Bangladesh, where building regulations are rarely enforced.
This blaze has been the deadliest fire in Bangladesh in the last 39 years.