The injured have been identified as T V Krishna, V Vijaya, Ramana, besides children Sai and Sravani.
Krishna and Sai were asleep in the first floor of a building, while Vijaya, Sravani and Ramana smelled a gas leak and went to the first floor to wake up Krishna and Sai.
After hearing the knocks, Krishna who did not notice the gas leak switched on the electric light, which led to sparks from the switch igniting the leaking gas and causing burns to all the five, the police said.
The injured were admitted to the King George Hospital, while a fire tender rushed to spot and put off the flames.
All the injured are out of danger, sources said.