Background and objective Gestational diabetes mellitus (GDM) is a form of diabetes that develops during pregnancy and can negatively affect both the mother and the fetus. This study aimed to assess the knowledge and awareness of GDM among pregnant women in primary care centers. By enhancing their understanding of the risks and symptoms of GDM, we can potentially mitigate adverse outcomes. Methods A cross-sectional study was conducted in the National Guard's primary healthcare facilities in Jeddah, Saudi Arabia. The study employed a validated 12-item questionnaire to collect data from 489 participants. The questionnaire items covered the identification of risk factors, diagnostic approach, treatment options, and complications related to GDM, considering maternal and fetal health implications. Results The study participants had a mean age of 30.9 years. Among these participants, 53.6% demonstrated a thorough understanding of GDM, 35.2% had moderate knowledge scores, and 11.2% had low knowledge scores. Higher levels of awareness were strongly associated with higher levels of education, gravidity, and prior knowledge of GDM. Conclusion The study highlights the importance of early detection and management strategies for GDM during pregnancy to minimize its negative impacts. Thefindings suggest the need for individually tailored antenatal education programs by healthcare professionals that address the needs of different populations. This is particularly relevant for women with lower education levels and those who are pregnant for the first time or have no prior knowledge of GDM.