Elliot Morales was charged with second-degree murder as a hate crime in the death of 32-year-old Marc Carson in Greenwich Village in May.
Morales allegedly fired the deadly shot while shouting anti-gay slurs.
Before opening fire, NYPD Commissioner Ray Kelly said Morales confronted the victim and his companion and asked if they "want to die here."
The shooting followed a series of recent bias attacks on gay men in New York, but this was the first deadly one.
About 15 minutes before the bloodshed, the gunman was seen urinating outside an upscale restaurant a few blocks from the Stonewall Inn, a birthplace of the gay rights movement, according to Kelly. He then went inside the restaurant and asked if someone was going to call the police about him.
Police said Morales told both the bartender and the manager, "if you do call the police, I'll shoot you" and opened his sweatshirt to reveal a shoulder holster with a revolver and made anti-gay remarks, Kelly said.
Morales has a previous arrest for attempted murder in 1998, police said.
He was charged with criminal possession of a weapon, menacing and menacing a police officer.
He was ordered held without bail.