I'm wondering not how gays were treated, but whether there are any significant examples of people in ancient times who identified as another sex. All periods/civilizations are welcome.
edit: perhaps I should include examples of transsexualism as well, which would probably be more common.
There are a few threads discussing this topic - I'm not an expert so I'll just link them here. It's quite fascinating, particularly the idea of "two-spirited" people in Native American culture.
The Roman emperor Elagabalus was likely transgender. They are recorded as being very feminine, wanting to be refereed to as a 'lady,' and offered vast sums of money for anyone who could give them a vagina.