Perinatologist
An obstetrical subspecialist concerned with the care of the mother and fetus at higher-than-normal risk for complications.
Since the perinatal period, depending on the definition, starts at the 20th to 28th week of gestation and ends 1 to 4 weeks after birth, a perinatologist logically could be a obstetrician or pediatrician but, in practice, a perinatologist is an obstetrician.
The comparable area of pediatrics is neonatology.
A high-risk baby might be cared for by a perinatologist before birth and by a neonatologist after birth.
The word 'perinatologist' is a linguistic sandwich of the Greek 'peri-' meaning 'around or about', 'natal' from the Latin 'natus' meaning 'born' and 'ologist' from the Greek 'logos' meaning 'student of.