Vaccinate. Ideally you should be vaccinated against hepatitis b before you ever become pregnant. If you happen to carry hepatitis b then your baby will get two vaccines upon birth to protect it from hepatitis b.
Preventable. If a pregnant woman is infected with hep b, then the risk of transmission to the fetus is high during peripartum period (vertical transmission). Mom can be treated with antivirals in the 3rd trimester (optional). The infant needs both immediate passive (hbig) and active immunization (hep b vaccination). Cdc recommendations: http://www.Immunize.Org/acip/hbvinfant_dearcolleague.Pdf.