There are in-game hints that Majora was once a living entity whose soul was transferred into a mask at some point. This was likely a ritual of some sort performed by the dark tribe in effort to seal it away. They, then, use the mask in hexing rituals. The mask obviously has some ability to feed off its host's emotions. Such seems to be the case with the Skull Kid. Infer to the transformation masks, which are believed (and highly suggested) to house spirits of the dead; in the case of Link - Darmani, Mikau, and the Deku Butler's son... Regarding its gender... I'll just say it's possible that Majora, the entity, is female. But its gender is a trait that Nintendo leaves uncertain, like much of its backstory. As such, I've always referred to the mask as genderless [using the gender-neutral pronoun "it"].
I've read many theories in regards to the hidden details in Majora's Mask, and many of them are so incredibly convincing that it's scary. However, others like the idea that Majora's gender could be determined based on its design might be taking it a bit far. Some theorists even believe that the designs on Majora's Wrath's body resemble the female anatomy down to reproductive organs. Conversely, I wouldn't say they're reading too much into things, seeing as how the game practically asks theorists to do so. [noparse]:S[/noparse] lol