Hepcidin is a regulator of iron metabolism. Diet affects the body’s iron status, but how it influences hepcidin concentrations and the risk of gestational iron-deficiency anemia (IDA) remains unclear. We investigated relationships of food and nutrient intake with serum hepcidin levels in relation to the iron status at a population scale. A retrospective cross-sectional study was conducted based on data obtained from the Nationwide Nutrition and Health Survey in pregnant women, Taiwan (2017~2020). In total, 1430 pregnant women aged 20~45 years with a singleton pregnancy were included. Data from blood biochemistry, 24-h dietary recall, and a food frequency questionnaire were collected during a prenatal checkup. Adjusted multivariate linear and logistic regression analyses were employed to measure the beta coefficient (ß) and 95% confidence interval (CI) of serum hepcidin and the odds ratio (OR) of IDA. In IDA women, serum hepcidin levels were positively correlated with the intake frequency of Chinese dim sum and related foods (β = 0.037 (95% CI = 0.015~0.058), p = 0.001) and dark leafy vegetables (β = 0.013 (0.001~0.025), p = 0.040), but they were negatively correlated with noodles and related products (β = −0.022 (−0.043~−0.001), p = 0.038). An adjusted multivariate logistic regression analysis showed that dietary protein [OR: 0.990 (0.981~1.000), p = 0.041], total fiber [OR: 0.975 (0.953~0.998), p = 0.031], and rice/rice porridge [OR: 1.007 (1.00~1.014), p = 0.041] predicted gestational IDA. Total carbohydrates [OR: 1.003 (1.000~1.006), p = 0.036], proteins [OR: 0.992 (0.985~0.999), p = 0.028], gourds/shoots/root vegetables [OR: 1.007 (0.092~1.010), p = 0.005], and to a lesser extent, savory and sweet glutinous rice products [OR: 0.069 (0.937~1.002), p = 0.067] and dark leafy vegetables [OR: 1.005 (0.999~1.011), p = 0.088] predicted IDA. The risk of IDA due to vegetable consumption decreased with an increasing vitamin C intake (p for trend = 0.024). Carbohydrates and vegetables may affect the gestational iron status through influencing hepcidin levels. Vitamin C may lower the risk of gestational IDA due to high vegetable consumption.