IntroductionGestational diabetes mellitus (GDM) is globally increasing due to changes in risk factors such as gestational age, obesity, and socioeconomic status (SES). This study examined trends of GDM prevalence over ten years using a real-world Primary Health Care database from Catalonia (Spain). Methods: A retrospective analysis of pregnant women screened for GDM was conducted, using clinical and SES data from the SIDIAP database. Results: Among 221,806 women studied from 2010 to 2019,17,587 had GDM, equating to a 7.9% prevalence (95% CI 7.8–8.04). GDM subjects were older (33.5 ± 5.1 vs. 31.2 ± 5.6 years; p < 0.001) and had higher BMI (29.2 ± 5.1 vs .27.8 ± 4.8 kg/m²; p < 0.001) than non-GDM individuals. Overall GDM prevalence remained unchanged throughout the study, although an increase was observed in younger women (below 20 years: 1.28% [95% CI 0.59–2.42] in 2010 to 2.22% [95% CI 0.96–4.33] in 2019, p = 0.02; ages 20–25.9 years: 3.62% [95% CI 3.12–4.17] in 2010 to 4.63% [95% CI 3.88–5.48)] in 2019, p = 0.02). Age, BMI ≥ 25 kg/m2, deprived SES, and previous hypertension and dyslipidaemia were positively associated with GDM. ConclusionsThis study offers insights into GDM prevalence in Catalonia (Spain),showing overall stability except for a rising trend among younger women.