(22) Jesus saw some infants at the breast. He said to his disciples: These little ones at the breast are like those who enter into the kingdom. They said to him: If we then be children, shall we enter the kingdom? Jesus said to them: When you make the two one, and when you make the inside as the outside, and the outside as the inside, and the upper side as the lower; and when you make the male and the female into a single one, that the male be not male and the female (not) female; when you make eyes in the place of an eye, and a hand in place of a hand, and a foot in place of a foot, an image in place of an image, then shall you enter [the kingdom].
"Masculine and feminine, male and female, man and women are not always self-evident and parallel categories in ancient discourses. That is, categories are certainly fixed, and further are arranged in a hierarchical dualism whereby masculine/male/man are in ascendancy over "opposites"...It is important to stress that there is a clear differentiation in gnostic texts between a notion of "oneness," where sexual or gender identity is erased, and a notion of "androgyne," where genders are blended. In these texts, androgyny is seen as monstrous and problematic, not as a state to be embraced.
One has, in the case of the Gospel of Thomas, to account further for the apparent contradiction between saying 22 and saying 114: in the first, it appears as though male and female are to be completely undercut, while in saying 114, maleness is embraced as a higher and desirable quality. Here, the work of the first-century Egyptian Jewish philosopher, Philo Judaeus, whose attempts to reconcile Platonism with Judaism, are remarkable studies in ingenuity, can perhaps lend some assistance. For Philo, the categories of male and female are not balanced, but rather represent superior and inferior states; the movement from femaleness to maleness is understood to be a progressive movement to a higher state of virtue, and is paralleled by a movement toward oneness..."
Catelli, Elizabeth A. (1991). "I Will Make Mary Male": Pieties of the Body and Gender Transformation of Christian Women in Late Antiquity".