A high-quality diet, as indicated by a total CHEI score of 80 or higher, and increased consumption of specific dietary components, namely potatoes, beans, dark green vegetables, and fruits, were found to effectively reduce the odds of GMS or related indices during mid-pregnancy.