A 1969 police raid at Stonewall led to street protests widely credited as the start of large-scale gay rights activism.
MORE: Victims of the Pulse Nightclub shooting in Orlando
A police counterterrorism unit was standing watch at the event outside the Greenwich Village tavern, which President Barack Obama has proposed to designate as the first national monument honoring the history of gays and lesbians in the U.S.
The crowd shouted "Not one more" and "Love is love is love is love is love".
Nick Jonas and Tituss Burgess also spoke at the event.
"I think there's a lot fear in the community here in New York City and around the country," de Blasio said in an interview on 1010 WINS radio. "Our message tonight is: We stand in solidarity with all members of the LGBT community."
MORE: Orlando mourns shooting victims; gunman may have been 'homegrown extremist'
A group of transgender Hispanic activists said they would march through the borough of Queens on Monday "to free our streets of homo-transphobia."
Some politicians planned to join in a vigil Monday night in Washington Heights, a largely Hispanic neighborhood.