She found the three in a break room, along with a fourth employee, police said.
Hiller told the fourth employee to "get out," and started shooting, said Capt. James Clark, commander of the Homicide Unit.
She has been charged with killing LaTonya Brown, 36, and Tanya Wilson, 47, both of Philadelphia. Coworker Bryant Dalton, 39, was hit in the neck. He remains in critical condition at Jefferson University Hospital.
Clark said the dispute between the three was a "war of words," and Hiller had accused coworkers for years of talking behind her back and spraying her with chemicals.
Hiller, a 15-year employee at the plant, also fired at her supervisor and a mechanic who followed her through the building, warning people to flee and talking to police on his cell phone. She missed both targets.
Hiller then barricaded herself in a cinder block laboratory - a quality control area - in a factory space on the second floor of the plant at 12000 Roosevelt Blvd.
Seven employees also were crouched down in a darkened side room, which police Chief Inspector Joseph Sullivan likened to "a closet." They were unharmed.
Hiller may have fired a shot at the first officers to arrive, before she dialed 911 and a police corporal on the line calmed her down.
SWAT team members eventually breached the laboratory and Hiller surrendered. She had placed the empty gun on the floor. Although she had more ammunition, she had not reloaded.
The Kraft Foods plant, for many years known as the Nabisco factory, was closed this morning. It is where Kraft makes Ritz Crackers and Lorna Doone cookies.
"This is a sad day for the Kraft Foods family," Susan Davison, the company's director of corporate affairs, said in a statement e-mailed to The Inquirer early today. "We are very sad to report that two employees died as a result of this incident. Our thoughts and prayers go out to their families."
About 100 workers were reportedly inside the plant when the shooting occurred.
A 57-year-old employee, who did not want to be named, said Thursday night that he was working on the second floor in the packaging department when someone ran in and yelled "Get out! Get out!" Then he heard a loud bang.
"I knew it was a gunshot," the man said.
As the employees ran out of the building, the police had already arrived and were running in, he said.
Tanya Bussey was at home in bed when she got a call from her sister, Valerie Johnson, 42, who works at the plant.
Her sister called to say someone was shooting and then the call was disconnected, Bussey said.
"I just started panicking," Bussey said, adding that she called another sister and went to the plant to find out if her sister was OK. Valerie was unhurt and the two hugged when they were reunited.
Relatives of the slaying victims also rushed to the plant before their bodies were removed about 1 a.m. today. One woman collapsed to ground and cried, "My sister" after she entered the gate.
The rampage was the deadliest workplace killing in Philadelphia since February 2007, when a disgruntled investor armed with two handguns killed three businessman and wounded a fourth in a conference room at the Naval Business Center in South Philadelphia. The gunman later killed himself.
Contact staff writer Troy Graham at 215-854-2730 or email@example.com.
Inquirer staff writers, Robert Moran, Jeff Shields, Chelsea Conaboy, and Claudia Vargas contributed to this article.