He was shot in the chest, but the bullet was stopped by his bullet-resistant vest. Other shots hit the officer's legs.
The gunman was killed in the crossfire.
Officer Salerno was the first officer shot in the line of duty this year. He joined the force in January 2007 and had been with the 44th Precinct since that June.
Authorities say Salerno and three other officers from the 44th precinct were met by a home health aide, who had called 911, in the lobby of the building. She told them that a man with a gun slapped her in the apartment where she was caring for an elderly resident.
The suspect was identified as Santiago Urena. The officers then went to the apartment accompanied by Urena's brother.
Urena was located inside a bedroom in the apartment. When officers went to the bedroom and opened the door, police said Urena started shooting, firing four shots.
The officers returned fire, 21 shots in all, and then retreated to take Salerno to the hospital.
A short time later, other officers converged on the apartment and found Urena dead in the bedroom.
Police said Urena was shot three times -- once in the right shoulder, in the abdomen and over his temple.
The medical examiner says Urena was killed by the volley of return fire, not a self-inflicted gunshot.