The first recorded use of it being used to describe a sexual identity was in the early 19th century; then, by the 20th century, it became a mainstream slur for LGBTQ+ people, alongside terms like “fairy” or “faggot”. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.