Yes, certain STDs can be transmitted from mother to fetus during pregnancy or at birth. Some examples are gonorrhea, chlamydia, syphilis, and HIV.
This is the reason why it is crucial that all pregnant women get tested and do every serology recommended, since STD can have severe consequences for the unborn child, or lead to stillbirth in the worst-case scenario.
Suggested for you: What Are Sexually Transmitted Diseases (STDs)? – Symptoms & Types.