Mani believed that while women possessed the Light within, it was in a far smaller capacity than men. And one cannot dismiss that according to at least one gnostic gospel, when Jesus was asked why he wasted his time with Mary Magdelene, he answered that he would turn her into a man.
Mani was also not a Christian, but the founder of Manichaeism. According to Christian Gnostic scripture, Mary Magdalene was exalted above the other apostles. She’s certainly portrayed as the one closest to Jesus during His life.
Yes, the scripture you’re refering to is the last verse of the Gospel of Thomas. The gospel itself is not really considered specifically Gnostic scripture, although it was popular among the early Gnostics. Most scholars feel that the last verse was added at a later date, and not part of the original sayings. It’s an interesting one because generally in Gnostic writings, the spirit is seen as feminine, while the body is refered to as masculine. So at first glance, this seems to suggest identification with the body rather than the spirit.
However, earlier in the Gospel of Thomas, we read: “When you make the two into one, and when you make the inner like the outer and the outer like the inner, and the upper like the lower, and
when you make male and female into a single one, so that the male will not be male nor the female be female, when you make eyes in place of an eye, a hand in place of a hand, a foot in place of a foot, an image in place of an image, then you will enter the Kingdom.” (Verse 22)
I think the last verse is more about discarding the illusion of division so that you can enter the Kingdom of Heaven, rather than literally turning a woman into a man.