To study dietary patterns during the second trimester of pregnancy and to investigate the relationship between dietary patterns and gestational weight gain (GWG). A prospective cohort study was conducted to select healthy singleton pregnant women at 8-14 weeks of gestation in a maternal and child health care institution in Chengdu city. Food items and quantities were collected at 8-14, 24-28, 32-36 weeks of gestation by using the 3-day 24-hour dietary recall and energy intakes were calculated. Dietary patterns during the second trimester were established by factor analysis and factor scores were calculated. The weight of pregnant women was measured at 8-14, 24-28 weeks of gestation and 1 week before delivery, and the total GWG and the GWG rates in the second and third trimesters were calculated. Multiple linear regression analyses were used to analyze the association between dietary patterns and GWG. A total of 1 004 samples were included. Three dietary patterns were identified: Milk-egg-whole grain pattern, Beverage-dessert pattern and Traditional pattern. The average total GWG was (13.2±4.5) kg. The average weight gain rate was (0.4±0.2) kg/week in the second trimester. The average weight gain rate was (0.5±0.3) kg/week in the third trimester. After adjusting for confounding factors including maternal age, body mass index before pregnancy, dietary energy intake, physical activity, multiple linear regression analysis showed that the factor score of Beverage-dessert pattern was positively associated with the total GWG and the weight gain rate in the third trimester ( β=0.370, 95% confidence interval ( CI): (0.103, 0.636), P=0.007; β=0.014, 95% CI: (0.000, 0.027), P=0.049, respectively), and the factor score of Traditional pattern was negatively associated with the total GWG ( β=-0.285, 95% CI: (-0.555, -0.015), P=0.039). There was no association between the Milk-egg-whole grain pattern and GWG. Dietary patterns during the second trimester of pregnancy are associated with GWG. The Beverage-dessert pattern may increase the total GWG and weight gain rate in the third trimester. The traditional pattern may help control the total GWG.