Final answer:
Newborns contract encephalitis caused by herpes simplex virus 1 or herpes simplex virus 2 from their mothers during childbirth. In some cases, the virus can also be transmitted before birth when it crosses the placenta.
Step-by-step explanation:
Newborns contract encephalitis caused by herpes simplex virus 1 or herpes simplex virus 2 from their mothers during childbirth. The virus is transmitted from the mother to the neonate when the child is exposed to pathogens in the birth canal. In some cases, the virus can also be transmitted before birth when it crosses the placenta. This can cause serious complications in fetal development and may result in spontaneous abortion or severe disabilities if the fetus survives.