Objectives To estimate the associations of moderate and vigorous intensity exercise during pregnancy with the rate of gestational weight gain (GWG) from gestational diabetes (GDM) diagnosis to delivery, overall and stratified by prepregnancy overweight/obesity. Methods Prospective cohort study with physical activity reported shortly after the GDM diagnosis and prepregnancy weight and post-diagnosis GWG obtained from electronic health records (n = 1055). Multinomial logistic regression models in the full cohort and stratified by prepregnancy overweight/obesity estimated associations of moderate and vigorous intensity exercise with GWG below and above the Institute of Medicine’s (IOM) prepregnancy BMI-specific recommended ranges for weekly rate of GWG in the second and third trimesters. Results In the full cohort, any participation in vigorous intensity exercise was associated with decreased odds of GWG above recommended ranges as compared to no participation [odds ratio (95 % confidence interval): 0.63 (0.40, 0.99)], with a significant trend for decreasing odds of excess GWG with increasing level of vigorous intensity exercise. Upon stratification by prepregnancy overweight/obesity, significant associations were only observed for BMI ≥ 25.0 kg/m(2): any vigorous intensity exercise, as compared to none, was associated with 54 % decreased odds of excess GWG [0.46 (0.27, 0.79)] and significant trends were detected for decreasing odds of GWG both below and above the IOM’s recommended ranges with increasing level of vigorous exercise (both P ≤ 0.03). No associations were observed for moderate intensity exercise. Conclusions for Practice In women with GDM, particularly overweight and obese women, vigorous intensity exercise during pregnancy may reduce the odds of excess GWG.