The study was intended to explore the risk factors of gestational diabetes mellitus (GDM) and their influence on perinatal outcomes through deep neural network (DNN)-based Doppler color ultrasound (B-mode ultrasound) images. Specifically, 75 women with GDM were selected as the experimental group, and 75 healthy pregnant women were selected as the control (Ctrl) group. DNN uses the unsupervised method to pretrain layer by layer and then uses the supervised method to accumulate parameters of each layer, which can obtain good performance. In this study, the risk factors of GDM and their influence on the perinatal outcomes were analyzed by DNN-based B-mode ultrasound images. It was found that pregnancy age was a risk factor for GDM (OR = 2.566), preference for sweets was a risk factor for GDM (OR = 1.678,
P
<
0.001
), and family history of DM was also a risk factor for GDM (OR = 12.789,
P
<
0.001
). The incidence of complications in the experimental group was higher than that in the Ctrl group (
P
<
0.05
). Therefore, the true positive recognition (TPR) rate of DNN was significantly higher than that of the traditional method, and the pregnancy age, the preference for sweets before pregnancy, and the family history of DM may be risk factors for GDM; also, GDM was an influencing factor for pregnancy outcome, neonatal outcome, and complications.