Neighbors said they heard several gunshots and went to help the victims, who appeared to be in shock. One used her T-shirt to wrap the little girl's leg while waiting for police to arrive.
Police did not release the names or address of the victims, but neighbors said they frequently had seen the girl playing with other children on the street.
The girl was sitting on a step and the grandmother standing when they were shot, witnesses said.
Police Lt. Frank Vanore said the victims got caught in gunfire between two men leaving Yang's Kitchen, a Chinese takeout at Tulip and Ann Streets, and people in a white Crown Victoria.
As the men left the restaurant, they approached the car. An argument erupted and one of the men fired six shots at the car as it sped off.
Nito Esquilin, manager of the Spott, a barbershop across the street from Yang's, said he had seen the woman limping around, "more concerned about the little girl than she was about herself."
Another witness, John Rochet, said he had seen the woman holding the child, whose blood was dripping down her leg.
One of the bullets tore a hole through the back of a parked Toyota Highlander.
Authorities said they had only vague descriptions of the men, who fled on foot. According to neighbors, one of the men, who was wearing jeans and a white T-shirt, tucked a weapon in his belt and walked briskly away on Ann Street.
Residents say they have appealed to police for help with rampant drug-dealing and violence.
A woman who gave only her first name, Susan, said drugs were sold "day and night," even by children.
"How long do we have to beg" for help? she asked.
Contact staff writer Barbara Boyer at 215-854-2641 or firstname.lastname@example.org.
Inquirer staff writer Kathy Boccella contributed to this article.