Two men were shot dead in the capital Bratislava on Wednesday, in a suspected hate crime.
Organisers estimated that 20,000 people took part in the vigil, mourning the men’s deaths and demanding action on LGBT rights.
Slovak President Zuzana Caputova, who has raised the rainbow flag over her office, spoke at the event.
“I’m sorry that our society was not able to protect your loved ones,” she said.
“You belong here, you are valuable for our society.”
Prime Minister Eduard Heger was also at the vigil, organised by the Inakosť (Otherness) Institute, an LGBT advocacy group.
Slovakia’s National Crime Agency has classified the shootings as premeditated murder, motivated by hatred of a sexual minority.
It has sparked calls for more protection of LGBT people in Slovakia, a relatively conservative EU country where same-sex marriage is not legal.
The BBC’s Rob Cameron, in neighbouring Czech Republic, said some Slovakians were angry at what they see as hypocrisy from politicians.
While the prime minister held a rainbow flag at the rally, in June an MP from his party called – unsuccessfully – for a ban of the flag on public buildings.
European Parliament Vice-President Michal Simecka, who was also at Friday’s event, said he wanted the European legislature to discuss the murders at a session next week.
“To express our sympathy, but also to call on the Slovak authorities to take clear steps to put an end to the language of hatred towards LGBTI people,” he said.
The two men were killed outside Bratislava’s Teplaren bar close to the city centre on Wednesday evening. Another woman was injured, and is now in a stable condition in hospital.
After a brief manhunt, police found the body of the 19-year-old gunman, who is believed to have shot himself, on Thursday morning.
He was identified as Juraj Krajcik, the son of a former far-right politician.
Just before the killings, he had posted an anti-LGBT and anti-Semitic manifesto on Twitter, warning that he would carry them out. He later also claimed responsibility.