The shooting happened around 9:30 p.m. in the vicinity of the Stuyvesant Garden Houses in Bedford-Stuyvesant.
Two men, who one witness said she recognized from the Eleanor Roosevelt Houses in Brooklyn, had just arrived at the scene when one of them pulled out a gun.
The witness said he opened fire on the crowd, seemingly firing indiscriminately.
Police say at least nine shots were fired into the courtyard, where at least 20 people were attending a nighttime gathering.
The women were struck as they were sitting outside with their children.
The victims have been identified as 21-year-old Chynna Battle, who was shot in the head, and 29-year-old Shaqwanda Sealy, who was shot in the back.
A vigil for Battle has been set up at the scene, with a steady stream of mourners throughout the evening coming by to pay their respects.
"Just a beautiful person, fiery personality, beautiful personality, anytime she walked in a room she lit it up and she didn't deserve to die like this," said Lynette Battle, a family member.
"I want whoever did this, that's my child, my baby, who is a good girl, and she died senselessly," said Mozelle Brown, Chynna's mother.
Chynna worked as a waitress to support her young daughter and herself.
"They're cowards, you are in your own community you should feel safe, you shouldn't have to run," Lynette said.
Authorities do not believe they were the intended target, and rather this was one housing complex targeting another.
Anyone with information is urged to contact police.