Premature birth is the primary cause of neonatal death and disability, which can affect the long-term health of newborns. However, the accurate prediction of premature birth is a difficult problem in the medical field. The early screening of premature birth in medicine is mostly based on special examinations, but it is difficult to be applied to large-scale clinical practice due to cost accounting and other problems. The popularization of electronic medical records and the development of artificial intelligence technology provide support for early risk assessment of obstetric diseases. This paper uses the diagnosis and treatment information of obstetric electronic medical records and proposes a hybrid model of GRU and GBDT to predict the risk of premature birth. The hybrid model uses GRU to explore the probability of premature birth in multiple antenatal examination information of pregnant women and integrates the results into the pregnancy data and the last antenatal data before 28 weeks. Finally, GBDT is used to predict the risk of premature birth for higher accuracy. The experimental results show that evaluation indexes such as AUC and ROC of the prediction method based on GRU and GBDT are better than those of other single machine learning models. The proposed method can provide a reference for the obstetric medical staff to judge the risk of premature birth in the early and middle stages of pregnancy.