Gestational diabetes mellitus (GDM) represents a prevalent complication during pregnancy, exerting both short-term and long-term impacts on maternal and offspring health. This review offers a comprehensive outline of DNA methylation modifications observed in various maternal and offspring tissues affected by GDM, emphasizing the intricate interplay between DNA methylation dynamics, gene expression, and the pathogenesis of GDM. Furthermore, it explores the influence of environmental pollutants, maternal nutritional supplementation, and prenatal gut microbiota on GDM development through alterations in DNA methylation profiles. Additionally, this review summarizes recent advancements in DNA methylation-based diagnostics and predictive models in early GDM detection and risk assessment for subsequent type 2 diabetes. These insights contribute significantly to our understanding of the epigenetic mechanisms underlying GDM development, thereby enhancing maternal and fetal health outcomes and advocating further efforts in this field.