Eye-witnesses said the blast took place at around 7 am.
They further said the 20 year-old building was reduced to rubble after a sound of the blast was heard.
Personnel of the Fire brigade and National Disaster Response Force, who rushed to the spot, recovered the bodies including that of two women.
Two of the deceased have been identified as Kalavathi (68) and Ravichandran (30).
Two children, who were rescued from the debris were out of danger, police said.
Karnataka Home Minister Ramalinga Reddy, who visited the spot, told reporters that the building belonged to one Gunesh.
Gunesh had rented the building to four families, he added.
"Two families were residing in the ground floor while one was on the first floor. Kalavathi and Ravichandran were in the first floor. They died on the spot while two children sustained injuries. They are safe. In the ground floor, members of two families might have been trapped," said the minister.
Bengaluru Mayor R Sampath Raj said four families were residing in the building
At least 40 fire-fighters and NDRF personnel were carrying out rescue operation.
While clearing debris to pull out those trapped in the building, three fire-fighters were injured as a wall fell on them, police said adding they had been shifted to a nearby hospital.