Background: Anemia in pregnancy constitutes a significant public health issue that elevates the likelihood of negative maternal and newborn outcomes. Insufficient understanding of iron requirements, suboptimal eating habits, and inadequate compliance with iron and folic acid supplements are significant contributors to the elevated incidence of maternal anemia. Nutrition education is regarded as an effective health promotion method to enhance preventative behaviors against anemia. This study sought to assess the impact of dietary education on anemia prevention in pregnant women at Passi Barat Primary Health Center. Methods: This research utilized a pre-experimental design incorporating a one-group pretest–posttest methodology. A total of 30 pregnant women in their second and third trimesters were recruited via purposive sampling. The intervention comprised three nutrition education sessions addressing iron requirements during pregnancy, sources of iron-rich foods, proper intake of iron-folic acid pills, and techniques for anemia prevention. Anemia preventive practices were evaluated by a structured questionnaire prior to and following the intervention. The Wilcoxon Signed Rank Test was employed for data analysis at a 95% confidence level. Results: Prior to the intervention, the majority of participants exhibited insufficient anemia prevention practices. Subsequent to the nutrition education session, the percentage of participants exhibiting effective anemia preventive practices significantly rose. Statistical analysis demonstrated a significant disparity between pretest and posttest scores (p = 0.001), showing that nutrition education substantially enhanced anemia preventive practices in pregnant women. Conclusion: Nutrition education significantly enhanced anemia preventive behaviors in pregnant women. Incorporating structured nutrition education into standard antenatal care is advised to improve compliance with iron supplementation, encourage healthy food habits, and bolster anemia prevention during pregnancy.