Final answer:
Erythromycin ophthalmic ointment is used in newborns to prevent ophthalmia neonatorum caused by Neisseria gonorrhoeae, which can result in blindness.
Step-by-step explanation:
Erythromycin ophthalmic ointment is applied to newborns' eyes to prevent neonatal conjunctivitis, specifically ophthalmia neonatorum, which is an inflammation of the conjunctiva caused by Neisseria gonorrhoeae transmitted during childbirth. This bacterial infection can lead to serious complications such as corneal ulceration or perforation and can result in permanent vision loss or blindness if left untreated. Hence, Erythromycin is used right after birth to thwart these infections, notably to prevent gonorrhea transmission from mother to child.