What happens if a baby comes out of an std-infected vagina during birth?

Depends on the std. Chlamydia, herpes, and gonorrhea can cause very severe, even fatal infections in newborn babies. Mothers who have untreated syphilis or HIV during pregnancy can pass these on to the baby. An important part of prenatal care is to test and treat mothers for these infections to reduce risks to babies. The risk of any of these can be greatly reduced by using condoms.