Bullets started flying just after 11 p.m. at the building on Albany Avenue near Fulton Street in Bedford-Stuyvesant, cops said.
Witnesses said the shots rang out during a party in the building, and teenagers were seen fleeing outside afterwards.
One of the victims was a 14-year-old girl who suffered a gunshot wound to the chest, a witness said.
The wounded were taken to the hospital where a 20-year-old woman died from her injuries and a 16-year-old boy was in critical condition.
The ages of the remaining victims were not immediately clear.
Police are investigating if the violence on Albany Avenue is connected to an earlier shooting outside a Sweet 16 celebration in East New York that left a 17-year-old wounded, according to law enforcement sources.
The teen was struck in the leg at the corner of Liberty Avenue and Crystal Street at about 9 p.m., police said. He was taken to Brookdale Hospital in stable condition.
Also on Sunday night, another 17-year-old boy was wounded in Brownsville, Brooklyn in a suspected drive-by shooting at about 9:45 p.m., police said.
He was hit in the neck outside 317 Livonia Avenue and taken to Brookdale Hospital in stable condition. Two suspects are being questioned in his shooting, sources said.