In his book Hermaphrodeities, Raven Kaldera tells the story of Agdistis and Attis.
The mythical Agdistis was born, he writes, "in the land of Asia Minor that was long ago ruled by the Great Mother Goddess Cybele". Agdistis was both male and female and had many sexual partners. The gods feared that Agdistis would become too powerful. They asked Agdistis to choose between being male or female. As Kaldera put the dialogue: "If you choose to be female, we will cut off your male parts. If you choose to be male, we will sew up your female parts." The gods were afraid to kill Agdistis lest they be cursed, so they asked Zeus's son Dionysus to do it.
Dionysus cut off Agdistis's male organ. (In some versions of the myth, Agdistis dies here; in others, not.) An almond or pomegranate tree grew where it fell. The river nymph Nana (of the river Sangarius) ate of it and became pregnant. She exposed her infant son, Attis, to die, but he was raised by a male goat.
When Attis grew up, he attracted the attention of the goddess Cybele, who wanted to sleep with him. Instead, Attis slept with Agdistis, who seduced his/her own son because he was the connection to Agdistis's lost genitals. Later, when Attis understood that the apparently female Agdistis was his biological father, he fled, and then sought to marry a woman. Cybele and Agdistis disrupted Attis's wedding. The bride cut off her breasts and died, while Attis attempted suicide by self-castration. Agdistis repented, and Cybele preserved Attis in a permanent sleep in which he would not decompose.
Attis is worshipped each year, two days before the Sanguinaria (March 25), when a young pine tree is cut, wrapped in linen, and carried. On the Sanguinaria, priests called the gallae would self-castrate during ecstatic dance in front of the temple.
The gallae were documented in Phrygia 2300 years ago. Gallae is the feminine form of the word; contemporary writings often use the masculine form, galli. The Romans imported Cybele's eastern religion to pretend that they had descended from the Trojans, yet the Romans were embarrassed by the gallae and decreed that they could not be citizens and that any Roman who underwent ritual castration would lose citizenship. The gallae were wandering fortunetellers and blessers and had temples called metro'ons. They would adorn statues of Cybele and parade them around on donkeys. They bleached their hair and wore jewelry and bright clothes. Their leaders wore tall hats. They carried musical instruments or antique weapons and engaged in ecstatic dance. The worship spread, and they were found from Spain to Anatolia.Source
Raven Kaldera. Hermaphrodeities: The Transgender Spirituality Workbook. USA: XLibris, 2001. pp. 18-19, 148-150.
According to K. A. Lucker, the British Assyriologist and linguist Rev. Archibald Henry Sayce (1846-1933) "was the first to propose a connection between the gallae, gender variant priests of Meter, and the GALA, gender-variant priests of Inanna. Although the GALA do not seem to alter their genitals (at least not universally), other significant parallels appear. The GALA are gender-variant figures in a whole category of gender-variant temple personnel which also includes the assinu, kulufu, pili-pili, and kurgarru." The suggestion was made again by Walter Burkert in 1979 but without evidence. More recently, Patrick Taylor, in "The GALA and the Galloi" (a paper presented at Emory University in 2004 that is now available on Academia.edu) suggests that the name may have been interculturally shared in the Bronze Age by "the Luwian people, neighbors of the Hittites whose rituals, particularly those at the cult centers Lallupiya and Istanuwia, parallel those of the gallae." The Phrygians came later in the Iron Age.
[The abstract for Taylor's paper says it provides "evidence supporting an etymological connection betweeen the Sumerian word GALA, borrowed into Akkadian as kalû, and the Greek word gallos (Latin gallus). W. Burkert (Homo Necans, Berlin, 1972, p. 271), following several scholars before him, has suggested a historical relationship between the Mesopotamian GALA/kalû, the cultic singer of lamentations in the "female" dialect of Sumerian, and the Hellenistic gallos, the wailing emasculated devotee of Kybele. Both are associated with bull sacrifices and bull-hide drums, and both display various transgendered characteristics....Among the men of Lallupiya we find the Anatolian "missing link" in the transmission of the Near Eastern institution of transgendered cultic singers, who appear centuries later as the galloi, devotees of the Anatolian mother goddess Kybele."]Lucker continues: "The GALA, also known as the GALA-TUR, sang their laments on behalf of the goddess Inanna in the dialect eme-sal, which was usually used to render the speech of female divinities. It seems that the function of the GALA was to represent the goddess and give voice to her negative emotions on her behalf, much like the gallae did during the mourning for Attis. In their lamentation songs, the GALA used a drum not unlike the tympanum used by the gallae (Taylor 2005). They also carry knives (Meador 2000: 164) which may be involved in self-cutting rituals like those of the gallae which led up to the cutting of the genitals. The GALA were also portrayed as engaging in anal sex with males. In Sumerian, GALA is written with the logograms for penis + anus (Taylor 2005). There are even similar stories about the GALA and the gallae, as in the following proverb, which is paralleled by a common theme in Hellenistic epigrams which will be discussed a little later on." Source K. A. Lucker. The Gallae: Transgender Priests of Ancient Greece, Rome, and the Near East. A thesis submitted to the Division of Humanities of New College of Florida in partial fulfillment of the requirements for the degree of Bachelor of the Arts in Classics/Anthropology under the sponsorship of David Rohrbacher. Sarasota, Florida. May 2005. pp. 21-24. Originally accessed as a Google doc in 2010; now on AWS.
Lucian of Samosata wrote De Dea Syria (About the Syrian Goddess) in the 2nd century C.E.
Clement of Alexandria (late 2nd century C.E.) and Firmicus Maternus (4th century CE) mention the rituals for the goddess Kybele involving the tympanum or kymbalon.
The Pazuzu demon in ancient Babylonia had eagle feet, lion paws, four wings, and a death grimace. These images were kept in windows of ancient homes, facing outward. An invocation against them said: "They are neither male nor female. / They have no spouse. They do not produce children."
Carol K. Mack and Dinah Mack. A Field Guide to Demons, Vampires, Fallen Angels and Other Subversive Spirits. (1998) Arcade, 2011.