The infant's mother was waiting with the stroller on the 23rd floor of an apartment building in Coney Island around 11:40 a.m., officials said.
When the doors opened, the woman stepped forward and both she and the stroller fell down the shaft and landed on the elevator car, which was out of service eight stories below, police said.
A mechanic who had been working on the elevator heard the mother's screams and helped pull her to safety, police said.
The circumstances of exactly where the elevator was when the woman and stroller landed on it were unclear.
The baby girl, identified as Areej Ali, of Brooklyn, was pronounced dead at Coney Island Hospital. The mother was hospitalized with non-life threatening injuries, police said.
Inspectors with the city's Department of Buildings were at the scene investigating.
"We will be testing all of the elevators in the building to ensure they are operating safely," DOB spokesman Andrew Rudansky said.
The elevator involved in the incident passed a thorough, "once-every-5-years inspection" in January, 2016, according to the buildings department.
In August, the elevator received a violation because its phone wasn't working, but building department inspectors determined it could safely remain in operation, the DOB said.
A resident of the building, Harold Noel, 37, told reporters they've had problems with the elevators in the past.
"Everybody is scared to take the elevator," Noel said. "I'm shocked right now. I don't know what's going on, I really don't."
Another resident, Robert Whitley, said the elevators were old.
"You press a button, it don't stop on that floor, doors open on any other floor," Whitley said. null