Ancient Greece is often used as an example of how societies should tolerate same-sex relationships, but I never really bought it.
I've done a little research (well... Wikipedia really, which was really unsatisfactory), and that claim seems to come from two concepts:
Pederasy: young men were supposed to have passive sex with their older mentors as part of their training and education. But that's weird: how can you institutionalize sexual relationships between people who are statistically not likely to be attracted to each other? The Wikipedia page talks about the divide between "essentialists" and "social constructionists", and in my opinion the latter seems absurd. Mariage between man and woman is (was) a social and political institution, but it worked because 95% of humans are attracted to the opposite gender. I believe that the ratio of gay men is a biological constant in our species, so there's no way it was a widespread practice. Seems like a case of "sparse stories from philosophers and poets talked about it and since they are our only source then it must have been common practice".
In the military: I get that same-sex relationships will be more common in legions composed exclusively of men, but that doesn't mean that leaders would encourage it. It couldn't have been widespread enough to be an essential aspect of how armies worked, could it?
So I'm just looking for some guidance here, because I feel that the subject might have been clouded by how homosexuality was perceived in the West in the last century, and that maybe contemporary historians might have a clearer outlook on the matter. I would actually be delighted if Ancient Greece was a strong example of how societies should treat queer people.
Thanks for your help!
Caveats 1: Greece and pre-Christian Rome had substantially similar models of sexuality. I know more about the latter, but the answer is pretty applicable to Greece.
Caveat 2: The phrasing of your question is a bit loose with "gender" (a psychosocial phenomenon) and "sex" (biology that's independent of society). This is important, because sex was the same in antiquity, while gender was not. The title of your question is about "same-sex relationships," but to talk about what is socially tolerated, we have to talk about gender. (Also, it's confusing that that the word "homosexual" now refers more to gender- than sex-based attraction...)
Caveat 3: this answer is pretty nsfw.
So:
Latin for "man" is vir, and this gender-like concept carried with it various social expectations that were very important. In the sexual realm, the requirement was to penetrate partners. An otherwise-honorable person of the male sex who was penetrated or did not participate was not a vir, but rather the neutral homin, or worse. Vir status did not at all depend on the sex of the people one penetrated. What mattered was social dominance, and penetration was one expression of this.
Romans had varying preferences for sexual acts, but these didn't generally carry social weight directly. Here, Martial answers his wife, upset with his sexual preferences, with examples of acceptable, mythic same-sex relationships:
Catching me with a boy, wife, you upbraided me harshly and point out that you too have an arse. How often did Juno say the same to her wanton Thunderer! Nonetheless he lies with strapping Ganymede. The Tirynthian used to lay wide his bow and bend Hylas over: do you think Megara had no buttocks? Fugitive Daphne tormented Phoebus: but the Oebalian boy bade those flames vanish. Though Briseis often lay with her back to Aeacus's son, his smooth friend was closer to him.
His wife is not upset at the infidelity itself or her husband being "gay." In her suggestion, she is clearly imagining sexual preference as a physical-body-type desire, not what we think of today as a gender desire.
Virgil is an good argument for social acceptability. He openly prefered to penetrate male partners, and he was a more-or-less state-sanctioned poet for the super moralistic Augustus. Ovid prefered women, though not exclusively.
Suetonius goes so far as to describe the emperor Claudius as downright abnormal for having exclusively female partners. In a list of serious character flaws, he writes that the emperor was "of an extreme lust towards women, completely lacking in experience of males." The emperor, as a proper man (vir), would of course be the penetrator in sex, but mixed choice of parters was the norm, to the extent that exclusive preferences could be scorned. Suetonius reflected high-society opinion and mores, as he was writing as a personal secretary to the emperor Hadrian.
Answer heavily informed by "A Brief History of Swearing" by Melissa Mohr.