The incident happened on Thursday.
The impact of the blast was so strong that the house of the Congress city unit chief, where the illegal factory was allegedly being run, came down and several adjoining houses and shops were also damaged.
Police and fire teams were pressed into service for the rescue operations. Seven persons, including two children were pulled out of the debris and taken to a hospital.
Rescue operation was underway till late on Thursday evening as two more persons were feared buried under the debris.
The bodies have been sent for post-mortem.
Sardhana circle office R.P. Shahi said, "Prima facie, the blast occurred after the gas cylinder caught fire. Forensic teams are also investigating to find the reason behind the blast.
"The Congress city president of Sardhana and another person have died in the blast and fire. At least 10 other houses have been damaged."
He further said, "A probe has been set up in the matter to find out what led to the accident."