Two other people in the apartment were also wounded.
The suspect, General Lee Waiters, 30, pulled out a .357 magnum in the Brooklyn apartment he shared with his girlfriend and began shooting after the grandmother, Mary Lee Clark, 50, asked him to stop drinking in front of the children, the New York Daily News reported.
Two sons of the shooter's girlfriend brought Waiters' rampage to an end by slamming his head into a fish tank in the apartment.
"They stopped him from shooting," a relative told the News. "Otherwise, everybody would be dead."
The dead child was identified as Tajmere Clark.
"She was the sweetest girl you'll ever meet," Chlowe Jones said of her cousin.
Relatives described Mary Lee Clark as a doting grandmother and community caretaker who organized an annual Mother's Day celebration.
"She could take a loaf of bread, a pack of liver and an onion and feed the whole project," Gwendolyn Clark said of her sister. "She would take care of everyone."
Clark's grandchildren were a special focus for her affections, said her niece Ebony Manning.
"Those kids were her heart," said Manning, 23.
Neighbors at the Unity Plaza Long Island Baptist Houses said they were startled to hear the gunfire at around 11:30 a.m. Sunday.
Neville Medley, 54, was resting on the bed in his girlfriend's first-floor apartment with her two young daughters when he heard a gunshot and a short pause followed by four more shots, he said.
Medley put the girls under the bed and went outside, where he heard commotion coming from an upstairs window.
"They were all hollering and screaming," Medley said.
Carmen Perez, 33, who lives a block away, said she saw the suspect celebrating his birthday on Saturday outside the apartment building.
"Everybody was celebrating. Everybody was enjoying themselves," Perez said.