The sex of your baby should now be apparent on an ultrasound scan, but you may not have this for a couple of weeks yet (see Finding out the sex of your baby).
Whether your baby develops into a boy or a girl depends on the presence or absence of a Y chromosome. Males are XY and the Y chromosome instructs the reproductive glands (gonads) to become testes. These then produce testosterone and other hormones that inhibit the development of the female organs and in turn stimulate the normal development of the external male genitalia.
If there is no Y chromosome, the gonad becomes an ovary and the internal genitals are female by default; it's not the ovary that dictates that the female reproductive organs will develop but the lack of testosterone. In the female the uterus is formed first and the vagina lengthens upward to meet it.