A few months ago I saw a video on facebook talking about hijra or Kinnar (the terms don't mean quite the same thing but the video gives definitions), the politically recognized third gender in India. (According to wikipedia, this terms is only used for male-to-female transgender individuals in Pakistan and India, while other areas use different terms.)
For some reason I didn't get the link and I couldn't find it again. I did, however, find this video by the Huffington Post from November 2016, which does a better job of explaining the terms used and the problems transgender people face in India. Unfortunately it doesn't go into the religious aspect of their role, so I've included a passage from wikipedia below, explaining a little about that.
There are several religious roles Hijras play, one of which is this:
In some versions of the Ramayana, when Rama leaves Ayodhya for his 14-year exile, a crowd of his subjects follow him into the forest because of their devotion to him. Soon Rama notices this, and gathers them to tell them not to mourn, and that all the "men and women" of his kingdom should return to their places in Ayodhya. Rama then leaves and has adventures for 14 years. When he returns to Ayodhya, he finds that the hijras, being neither men nor women, have not moved from the place where he gave his speech. Impressed with their devotion, Rama grants hijras the boon to confer blessings on people during auspicious inaugural occasions like childbirth and weddings. This boon is the origin of badhai in which hijras sing, dance, and give blessings. (wikipedia)