Importance:Both low and high gestational weight gain have been associated with adverse maternal and infant outcomes, but optimal gestational weight gain remains uncertain and not well defined for all prepregnancy weight ranges. Objectives:To examine the association of ranges of gestational weight gain with risk of adverse maternal and infant outcomes and estimate optimal gestational weight gain ranges across prepregnancy body mass index categories. Design, Setting, and Participants:Individual participant-level meta-analysis using data from 196 670 participants within 25 cohort studies from Europe and North America (main study sample). Optimal gestational weight gain ranges were estimated for each prepregnancy body mass index (BMI) category by selecting the range of gestational weight gain that was associated with lower risk for any adverse outcome. Individual participant-level data from 3505 participants within 4 separate hospital-based cohorts were used as a validation sample. Data were collected between 1989 and 2015. The final date of follow-up was December 2015. Exposures:Gestational weight gain. Main Outcomes and Measures:The main outcome termed any adverse outcome was defined as the presence of 1 or more of the following outcomes: preeclampsia, gestational hypertension, gestational diabetes, cesarean delivery, preterm birth, and small or large size for gestational age at birth. Results:Of the 196 670 women (median age, 30.0 years [quartile 1 and 3, 27.0 and 33.0 years] and 40 937 were white) included in the main sample, 7809 (4.0%) were categorized at baseline as underweight (BMI <18.5); 133 788 (68.0%), normal weight (BMI, 18.5-24.9); 38 828 (19.7%), overweight (BMI, 25.0-29.9); 11 992 (6.1%), obesity grade 1 (BMI, 30.0-34.9); 3284 (1.7%), obesity grade 2 (BMI, 35.0-39.9); and 969 (0.5%), obesity grade 3 (BMI, ≥40.0). Overall, any adverse outcome occurred in 37.2% (n = 73 161) of women, ranging from 34.7% (2706 of 7809) among women categorized as underweight to 61.1% (592 of 969) among women categorized as obesity grade 3. Optimal gestational weight gain ranges were 14.0 kg to less than 16.0 kg for women categorized as underweight; 10.0 kg to less than 18.0 kg for normal weight; 2.0 kg to less than 16.0 kg for overweight; 2.0 kg to less than 6.0 kg for obesity grade 1; weight loss or gain of 0 kg to less than 4.0 kg for obesity grade 2; and weight gain of 0 kg to less than 6.0 kg for obesity grade 3. These gestational weight gain ranges were associated with low to moderate discrimination between those with and those without adverse outcomes (range for area under the receiver operating characteristic curve, 0.55-0.76). Results for discriminative performance in the validation sample were similar to the corresponding results in the main study sample (range for area under the receiver operating characteristic curve, 0.51-0.79). Conclusions and Relevance:In this meta-analysis of pooled individual participant data from 25 cohort studies, the risk for adverse maternal and infant outcomes varied by gestational weight gain and across the range of prepregnancy weights. The estimates of optimal gestational weight gain may inform prenatal counseling; however, the optimal gestational weight gain ranges had limited predictive value for the outcomes assessed.