About 42,000 customers lost electricity in the early evening on Saturday, according to power utility Con Edison, which didn't indicate a cause of the power failure, AFP reported.
The power returned around 10:00 p.m. (0200 GMT), accompanied by applause that could be heard throughout the formerly darkened streets.
Mayor Bill de Blasio said on Twitter that the outage was caused by a "manhole fire," but later told CNN it was under investigation.
Earlier in the day, dozens of people posted photos on social media of streets, subways and apartments shrouded in darkness.
The blackout disrupted services across the United States's most-populous city, with New York's Metropolitan Transportation Authority on Twitter encouraging "everyone to avoid below-ground subway stations," which account for most of the city's rail network.
Firefighters said they responded to numerous requests for help, particularly from people trapped in elevators, and the strobes of police cars and ambulances were some of the few to stand out in a city where light is rarely in short supply.
New Yorkers in general took Saturday's outage in stride, with passersby manning intersections to direct traffic and a disrupted Carnegie Hall concert continuing in the street.
Officers shouted "let's go!" at drivers as they tried to keep traffic flowing, while people strolled nonchalantly on streets that were temporarily closed to vehicles.
At the Row NYC hotel on 8th Avenue, dozens of guests were sitting on the sidewalk outside the property.
Hotel staff had asked them not to go inside as there were no lights for them to see by and the elevators weren't working, 16-year-old Spanish tourist Alba Moreno said.
Con Edison said it would have most of its customers back online by midnight, but there were few details about the cause of the outage.
"This appears to be something that just went wrong in the way that they transmit power from one part of the city to another to address demand," said de Blasio.
The mayor was not in New York but rather Iowa, where he was pursuing the Democratic nomination for president despite low poll numbers — which did not escape the notice of New Yorkers.
"Drop out of the presidential campaign," one commenter wrote on Twitter. "You clearly have to be in the city to — you know — do your job."
The cut affected the western chunk of Manhattan, particularly the Hell's Kitchen neighborhood and the Broadway theater district.
Most Broadway shows were canceled, including hit musicals "Hamilton" and "The Lion King," while a choir performing at Carnegie Hall moved out to the sidewalk to continue their show.
It took place on the anniversary of a 1977 power cut that affected virtually all of New York as it was struggling through an economic crisis.
Looting and vandalism then broke out, affecting more than a thousand businesses before the lights came back on 25 hours later.