No, fortunately, it's not as dangerous as Russia or Iran or something. Physical attacks are rare to none but there have been cases of parents disowning their kids because of them being gay. Throughout the whole country there is basically "don't ask, don't tell policy". PDA is a huge no-no.
And it's in your own best interest to keep silent. If you're openly gay, you might get verbally bullied in your school or job and there will definitely be a lot of people who'll turn their backs at you even if you were good friends previously. If your potential employer finds out about your sexuality, you might not get hired. Gay celebrities are getting an enormous amount of dirt on them in the internet comments.
It's difficult to tell what's the driving force for it is. Religion is surely one of the reasons, most Latvians are Christians and use the Bible to defend their reasons for disliking gays. Also, people see homosexuality as something that destroys the "traditional values" and strongly insist that only a man and a woman is a family. Latvians in their core simply are very stereotypical, old-fashioned and ignorant people, and anything that's out of the frames of their common lifestyle, is seen as weird, wrong, and bad.
We also do have Pride parades every now and then. They're very small and getting a lot of backlashes. One year there was shit thrown at the participants, actual feces. The government is also full of homophobes, same-sex marriage legalization has been turned down many times and it's unlikely to change.
You can travel to Latvia, it's not a dangerous country as long as you keep to yourself and don't show in any way, shape or form that you're gay.
Oh Jesus, I wrote so much without even realizing it