The aim was to analyse whether changes in the Healthy Food Intake Index (HFII) during pregnancy are related to gestational diabetes (GDM) risk. The 251 pregnant women participating had a pre-pregnancy BMI≥30 kg/m2 and/or a history of GDM. A 75 g oral glucose tolerance test (OGTT) was performed during the first and second trimesters of pregnancy for assessment of GDM. A normal OGTT result at first trimester was an inclusion criterion for the study. FFQ collected at first and second trimesters served for calculating the HFII. A higher HFII score reflects higher adherence to the Nordic Nutrition Recommendations (NNR) (score range 0–17). Statistical methods included Student’s t test, Mann–Whitney U test, Fisher’s exact test and linear and logistic regression analyses. The mean HFII at first trimester was 10·1 (95 % CI 9·7, 10·4) points, and the mean change from the first to the second trimester was 0·35 (95 % CI 0·09, 0·62) points. The range of the HFII changes varied from –7 to 7. The odds for GDM decreased with higher HFII change (adjusted OR 0·83 per one unit increase in HFII; 95 % CI 0·69, 0·99; P=0·043). In the analysis of the association between HFII-sub-indices and GDM, odds for GDM decreased with higher HFII-Fat change (fat percentage of milk and cheese, type of spread and cooking fats) but it was not significant in a fully adjusted model (P=0·058). Dietary changes towards the NNR during pregnancy seem to be related to a lower risk for GDM.