Brian Moore had been in critical condition since Saturday, when he and a fellow officer were shot at while trying to question a man in Queens.
Moore was struck in the head; the other officer was uninjured.
"In his very brief career -- less than five years -- he had already proved himself to be an exceptional young officer," New York Police Commissioner William Bratton said. "In that career, he had made over 159 arrests protecting and serving the citizens of this city."
Moore had received two exceptional police service medals.
"We don't give them out easily," Bratton said. "He worked for them; he earned them."
The man accused of the shooting, Demetrius Blackwell, was arrested and charged with first-degree attempted murder. Those charges will likely be upgraded with Moore's death.
Being with New York Police Department was Moore's dream, New York Mayor Bill de Blasio said.
"He did everything a good police officer was supposed to do," he said.
At just 25, Moore had proved himself courageous, the mayor added.
Blackwell, 35, appeared before a judge on Sunday and did not enter a plea.
Moore and another officer, Erik Jansen, 30, were sitting in an unmarked police vehicle in Queens on Saturday when they saw a passerby adjusting something in his waistband, according to the NYPD.
Moore, who was driving, pulled up behind the man, later identified as Blackwell, to ask about it. Blackwell allegedly pulled a gun from his waistband and opened fire on both officers, who were in the car and had no chance to fire back.
NYPD Chief of Detectives Robert Boyce said Moore's partner was able to identify Blackwell after he was arrested.
Two witnesses also identified Blackwell as the man they saw running with a firearm in the street near the site of the shooting, Boyce said.
The suspect was arrested nearby as he tried to retreat into the backyards of the neighborhood homes, he said.
On Monday, police recovered a gun -- a Taurus Model 85 5-shot revolver -- from one of the backyards near where Blackwell was apprehended, Boyce said.
The gun had three spent rounds and two live rounds.
The gun was one of 11 firearms that were stolen in Perry, Georgia, in 2011, Boyce said.
Ten of those guns have been recovered in the years since -- nine of them in New York, he said.
Blackwell's attorney, David Bart, told CNN that it wasn't unusual for no plea to be entered at this stage, saying that in "a case like this, the court rarely asks for one at this time."
"I don't think anyone should rush to judgment," Bart said. "I'm still working and looking into things."
If convicted, Blackwell faces 15 years to life in prison.