The Kiwi crew, led by Ashby and world sailor of the year Peter Burling, was dead in the water at the start of race three. Crewman Blair Tuke had to jump in the water to unhook the starting buoy's anchor line from the catamaran's rudder.
Making matters worse, the port hull was punctured by the buoy and water was leaking into the hull throughout the race.
Team NZ's luck changed on the penultimate leg. They rounded the last windward mark in fifth place, about 42 seconds behind Dean Barker's Team Japan.
But as all the crews began to the downwind leg they sailed into a patch of no wind that engulfed the course.
As the leg was perpendicular to the southerly flowing current, some of the crews were swept across the course boundary. British team Ben Ainslie Racing, Team France and Team Japan were all penalised for going beyond the boundary.
Team New Zealand, further behind, held in the middle of the course and when the wind filled in took off on hydrofoils at 16-20 knots leaving the rest of the fleet gasping in disbelief.
Having recorded third placings in the first two races of the day, the bullet in the final race saw Team NZ just pip hometown favourites, Oracle Team USA, for the New York title.
Burling admitted his team were very lucky to take out the win, which saw them extend their overall lead in the series by two points.
"I think we got a little fortunate the breeze was so shifty it kind of allowed us to come back through in that last race after a pretty average start, it's better to be lucky than good sometimes in our game."
Franck Cammas' Team France, who won race two, finished third overall to secure their first podium finish of the world series, while Team Japan placed fourth.
The next leg is in Chicago from June 10-12, the seventh of 11 in the series.
Louis Vuitton America's Cup World Series New York, final standings
1. Emirates Team New Zealand - 52 points
2. Oracle Team USA - 50 points
3. Team France - 44 points
4. Team Japan - 42 points
5. Ben Ainslie Racing - 42 points
6. Artemis Racing - 40 points
World Series overall standings
(After six events)
1. Emirates Team New Zealand - 244 points
2. Oracle Team USA - 236 points
3. Ben Ainslie Racing - 227 points
4. Team Japan - 203 points
5. Artemis Racing - 201 points
6. Team France - 194 points