The sex of the unborn baby is determined by the sex chromosomes of the father. An egg has two X chromosome while a sperm has a X and a Y chromosome. An egg will always have an X chromosome. Therefore, if the sperm contributes X chromosome then the baby will be a female (XX) and if the sperm contributes the Y chromosome, the baby will be a male (XY). So it is the father, who is responsible for the sex of the baby.