The accident occurred due to "mishandling" of chemicals for manufacturing crackers, police said.
While two women died on the spot, others died on their way to hospital, police said.
All the injured have been been admitted to the hospital.
District Collector L subramanian cancelled the licence of the private factory immediately and ordered for a probe into the accident.