Police Chief Charles Ramsay said the woman, who had worked at the plant for 15 years, had been suspended and was escorted from the building, KYW-TV, Philadelphia, reported. She drove through a barrier and re-entered the former Nabisco bakery at about 8:45 p.m. EDT, armed with a .357 Magnum, police said.
KYW News Radio reported the woman surrendered after calling the police emergency line on her cellphone.
Co-workers identified the suspect as Yvonne Hiller, The Philadelphia Inquirer reported. The newspaper said she was arrested at about 9:35 p.m.
About 100 people were working in the building when the shooting started. Worried family members began showing up at the factory after hearing about the violence from news reports and calls from relatives inside.
Police said the woman took several hostages, who were rescued unharmed by a SWAT team.
Nativity scenes to be moved at Guantanamo after troops' protest
'Duck Dynasty's Phil Robertson on indefinite hiatus after anti-gay remarks