The accident occurred early on Saturday morning at Tarapur Moholla in the Savar municipal area, said Savar Model Police Station SI Lutfer Rahman.
The deceased are local residents Raoshan Alim, 55, and his wife Khoirun Nesa, 45.
The five injured family members have been admitted to the burn unit of the Savar Enam Medical College Hospital for treatment. They are out of danger, said SI Lutfer.
On Saturday morning the Titas Gas pipeline to the house suddenly exploded and a fire broke out in the house, SI Lutfer told bdnews24.com. The couple were killed instantly.
Hospital Director Anwarul Kadir Nazim said the family and friends of the burn victims are preparing to take them home after the hospital administers them first aid.