Eight people were shot and wounded, four of them children, by a gunman in a ski mask at a Coney Island family barbecue as the city grappled with a wave of overnight Fourth of July gun violence, police said Sunday.

A crowd was gathered for the cookout on W. 31st St. near Surf Ave., just a block from the Brooklyn neighborhood’s famed boardwalk and beach, when shots rang out as fireworks boomed in the air above about 10:35 p.m. Saturday, cops said.

A 21-year-old woman shot in the chest was hospitalized in critically condition, police said. Seven other victims are expected to recover: a  6-year-old boy shot in the stomach, a 7-year-old boy shot in both legs, a 12-year-old boy shot in the leg, a 14-year-old boy shot in the thigh, a 25-year-old woman shot in the leg, a 33-year-old man shot in the chest, and a 37-year-old man shot in the shoulder.

The shooter who fled was dressed in all black, including a black ski mask, cops said. Police recovered a TEC-9 gun from the scene but have made no arrests.

The shooting was one of a half dozen across the city Saturday night into Sunday morning.