According to a herpes website I visited:
an estimated 20-25% of pregnant women have genital herpes, while less than 0.1% of babies contract an infection.
If the mother is not experiencing an outbreak, doctors may even suggest/ allow that she give birth vaginally. If she is experiencing an outbreak, a cesarean section is necessary to prevent the baby from being infected with active virus.
Another thing the site explained-
Fortunately, babies of mothers with long-standing herpes infections have a natural protection against the virus. Herpes antibodies in the mother's blood cross the placenta to the fetus. These antibodies help protect the baby from acquiring infection during birth, even if there is some virus in the birth canal. That's the major reason that mothers with recurrent genital herpes rarely transmit herpes to their babies during delivery. Even women who acquire genital herpes during the first two trimesters of pregnancy are usually able to supply sufficient antibody to help protect the fetus.