He's not saying male and female babies are the same. He said in utero (in the womb).
In the womb, male and female fetuses are pretty much identical from the start. 6 weeks in, the important stages of differentiation occur. If the SRY gene (usually found on the Y chromosome, but it can be translocated to an X chromosome in rare cases) is expressed, the fetus will grow balls, if not, it will grow ovaries.
If the fetus grows testicles, DHT will be secreted and the external genitalia (which up til this point look exactly the same for boys and girls) will assume the male form. If they don't make DHT (because the fetus is a girl or because there's a 5 alpha reductase deficiency), the fetus will look like a female.
Diseases like congenital adrenal hyperplasia can make a female producing excessive amounts of androgens get virilized genitals as well.