Existing research on neighborhood environment and gestational weight gain (GWG) focuses on point-in-time measures of neighborhood context. This precludes understanding how long-term exposure to adverse neighborhood environments influences GWG. We estimated associations between average exposure to and trajectories of long-term neighborhood socioeconomic deprivation and risk of inadequate or excessive GWG. Using data from 5690 full-term, singleton pregnancies in the 1979 National Longitudinal Survey of Youth, we estimated associations between cumulative deprivation and GWG, overall and by race/ethnicity, controlling for individual and residential covariates. A one standard deviation unit (8-point) increase in neighborhood deprivation increased risk of inadequate GWG (Relative Risk (RR): 1.08; 95% Confidence Interval (CI): 1.00–1.16) for all women and excessive GWG (RR: 1.11; 95% CI 1.02–1.21) for white women. Persistent low deprivation (RR: 0.78; 95% CI: 0.64–0.94) and upward mobility (RR: 0.76; 95% CI: 0.61–0.96), compared to persistent high deprivation, reduced risk of inadequate GWG. Persistent low deprivation also reduced risk of excessive GWG (RR: 0.84; 95% CI: 0.71–0.98). Long-term neighborhood deprivation contributes to patterns of GWG over women's life course.