Few studies have investigated the relationship between the food and physical activity environment and odds of gestational diabetes mellitus (GDM). This study quantifies the association between densities of several types of food establishments and fitness centers with the odds of having GDM. The density of supermarkets, fast-food restaurants, full-service restaurants, convenience stores and fitness centers at 500, 1000 and 1500m (m) buffers was counted at residential addresses of 68,779 pregnant individuals from Eastern Massachusetts during 2000-2016. The 'healthy food index' assessed the relative availability of healthy (supermarkets) vs unhealthy (fast-food restaurants, convenience stores) food retailers. Multivariable logistic regression quantified the cross-sectional association between exposure variables and the odds of having GDM, adjusting for individual and area-level characteristics. Effect modification by area-level socioeconomic status (SES) was assessed. In fully adjusted models, pregnant individuals living in the highest density tertile of fast-food restaurants had higher GDM odds compared to those living in the lowest density tertile (500m: odds ratio (OR):1.17 95% CI: [1.04, 1.31]; 1000m: 1.33 95% CI: [1.15, 1.53]); 1500m: 1.18 95% CI: [1.01, 1.38]). Greater residential density of supermarkets was associated with lower odds of GDM (1000m: 0.86 95% CI: [0.74, 0.99]; 1500m: 0.86 95% CI: [0.72, 1.01]). Similarly, living in the highest fitness center density tertile was associated with decreased GDM odds (500m:0.87 95% CI: [0.76, 0.99]; 1500m: 0.89 95% CI: [0.79, 1.01]). There was no evidence of effect modification by SES and no association found between the healthy food index and GDM odds. In Eastern Massachusetts, living near a greater density of fast-food establishments was associated with higher GDM odds. Greater residential access to supermarkets and fitness centers was associated with lower the odds of having GDM. NIH.