Background. Gestational diabetes mellitus (GDM) refers to the diabetes first discovered or occurring during pregnancy. The incidence of gestational diabetes in China is about 1%–5%, with an increasing trend in recent years. Objective. To observe the effect of evidence-based diet nursing on intestinal flora and maternal and infant prognosis in patients with gestational diabetes. Methods. One hundred and thirty patients with GDM admitted to our hospital from January 2020 to January 2022 were selected and divided into two groups according to the intervention method, with 65 cases in each group. The control group was given routine nursing plus diet nursing, while the observation group was given evidence-based nursing plus diet nursing. The changes of blood glucose index and intestinal flora before and after intervention in the two groups were detected, and the compliance behavior, pregnancy outcome, and perinatal outcome in the two groups were statistically analyzed. Results. After the intervention, the fasting blood glucose, 2 h postprandial blood glucose, and HbA1c in the two groups gradually decreased (
P
<
0.05
). Further comparison between the groups showed that the fasting blood glucose, 2 h postprandial blood glucose, and HbA1c in the observation group were lower than those in the control group (
P
<
0.05
). After intervention, the ratios of Bifidobacterium, Lactobacillus, and Bifidobacterium to E. coli in the two groups gradually increased (
P
<
0.05
). Furthermore, comparison between the groups showed that the ratios of Bifidobacterium, Lactobacillus, and Bifidobacterium to E. coli in the observation group were higher than those in the control group (
P
<
0.05
). The blood glucose rate, regular prenatal examination rate, and diet control rate of the observation group were 100.00%, 100.00%, and 95.38%, respectively, which were higher than 89.23%, 92.31%, and 84.62% of the control group, and the difference was significant (
P
<
0.05
). The pregnancy infection rate and cesarean section rate in the observation group were 0.00% and 33.85%, respectively, which were lower than 6.15% and 60.00% in the control group, and the difference was significant (
P
<
0.05
).The premature delivery rate and polyhydramnios rate in the observation group were 3.08% and 1.54%, respectively, which were not significantly different from 6.15% to 7.69% in the control group (
P
>
0.05
). The rates of macrosomia, neonatal hypoglycemia, and neonatal hyperbilirubinemia in the observation group were 1.54%, 3.08%, and 9.23%, respectively, which were lower than those in the control group (10.77%, 13.85%, and 23.08%), and the differences were significant (
P
<
0.05
). The fetal malformation rate and neonatal asphyxia rate in the observation group were 0.00% and 1.54%, respectively, which were not significantly different from 1.54% to 7.69% in the control group (
P
>
0.05
). Conclusion. The application of evidence-based care combined with dietary care in GDM patients can improve intestinal flora, control blood glucose, improve patient compliance behavior, and improve maternal and infant outcomes.