Q: Is it allowed to know the gender of the child when the woman is pregnant? (email)
A: if a woman is undergoing a regular checkup and during this checkup process the doctors share information as related to the gender of the child, then in such a case such information would not be impermissible.
To seek out the gender without a genuine i.e. medical reasoning, etc. is not encouraged.
Allah Certainly Knows Best.