Gender permeates our American culture, from shampoo for men and pink shaving razors to gendered restrooms and clothing choices. We are a culture which has internalized gender as something real and solid. However, The Buddha’s teachings when analyzed in light of modern gender conceptions leads to a direct undermining of the solidity of gender. To understand Buddhism’s relationship to gender we must first define gender:
We construct our own gender identities based on what feels genuine, comfortable and sincere to us as we live and relate to others within given social and cultural constraint. [Meaning, gender is something constructed by and or for us, defining how we relate to ourselves and relate to others.]The Transfeminist Manifesto
The key word to address here is construct, that gender is something made by us and or others. Buddhism holds that who we are is a bundle of 5 khandas, often translated as aggregates:
- Form (The body)
- Fabrications/Volitional Formations
From the above definition of gender we see that gender is a fabrication. The cause of this fabrication is ignorance  and to take this fabrication of gender as a me, mine or myself is a characteristic of unelightened people and a cause of dissatisfaction, The Buddha explains this in relation to a dog on a chain:
Suppose, bhikkhus, a dog tied up on a leash was bound to a strong post or pillar: it would just keep on running and revolving around that same post or pillar. So too, the uninstructed worldling … regards form as self … feeling as self … perception as self … volitional formations as self … consciousness as self…. He just keeps running and revolving around form, around feeling, around perception, around volitional formations, around consciousness. As he keeps on running and revolving around them, he is not freed from form, not freed from feeling, not freed from perception, not freed from volitional formations, not freed from consciousness. He is not freed from birth, aging, and death; not freed from sorrow, lamentation, pain, displeasure, and despair; not freed from suffering, I say.SN 22.99
This is contrasted with an enlightened being who does not consider fabrication as me, mine or myself.
The instructed noble disciple … does not regard form as self … nor feeling as self … nor perception as self … nor volitional formations as self … nor consciousness as self.SN 22.99
To understand in another way, we can look at Anathapindaka’s explanation of Dhamma:
Whatever has been brought into being, is fabricated, willed, dependently originated, that is inconstant. Whatever is inconstant is stress. Whatever is stress is not me, is not what I am, is not my self.AN 10.93
Therefore, any enlightened being does not see gender (a fabrication) as me, mine or myself. In this way, The Buddha feels no sense of gender as part of himself. Having “discern[ed] the higher escape from [stress] as it actually is”  through the end of ignorance (that which fabrication is dependent upon) The Buddha no longer fabricates gender and is therefore without gender.
There are a couple of counter-arguments to this hypothesis. Why do we and the suttas reference Buddha and arahants with gendered pronouns? I think most straightforwardly, The Buddha wouldn’t care, would recognize the difficulty in being seen as other than man or woman in terms of dissemination of his teachings or that gendered terms were added to the canon after the fact. Similarly to arahants functioning in conventional society and not caring to function as gender advocates due to the friction advocacy causes.
A follow up question might then ask, if arahants lack gender, why is there a gender based division in the sangha? This comes down to the vast majority of those who ordain not being enlightened themselves, with the majority of people being heterosexual and benefiting in the practice of celibacy with a mono-gendered community. I think another function at the time of the Buddha was to prevent criticism by laypeople of perceived promiscuity.
Another question that might arise is asking if there is a residue of gender similar to the residue of the body after enlightenment. I’ll put forward a no toward this question on account of gender being an active fabrication, not something which perpetuates itself in isolation of mental activity. Nibbana is sometimes called “the unformed, uncreated, unfabricated, unconditioned” all of which indicates a lack of gender.