To dream about your gender indicates that you are evaluating your role and how you are perceived by society. Perhaps you are feeling self-conscious about specific gender roles. If you dream of the opposite gender than your own, then it means that you need to incorporate aspects of the opposite sex into your own character.
If you are pregnant and dream of the gender of the baby, then the dream reflects your waking preoccupation with the gender of the baby. It is normal to wonder whether you are having a boy or a girl. In fact, when others find out that you are pregnant, they often ask if you are having a boy or a girl. There is no evidence that dreams can “tell” you the sex of the baby.