The objective of this study is to assess the levels of heavy metals (cadmium, lead, antimony, mercury, and arsenic), which are also called endocrine-disrupting chemicals, and trace elements (chromium-III, chromium-VI, zinc, copper, and selenium) vs. monocyte to HDL ratio among pregnant women with gestational diabetes mellitus (GDM). A total of 112 pregnant women (60 with GDM and 52 healthy women) were included in this case-control study. Analysis of heavy metals and trace elements were performed in inductively coupled plasma mass spectrometer. Heavy metals (cadmium, lead, antimony, mercury, and arsenic), trace elements (chromium-III, chromium-VI, zinc, copper, and selenium), and metabolic parameters were assessed in both groups. It was determined that the levels of cadmium, lead, antimony, and copper were higher (p < 0.05) and levels of chromium-III, zinc, and selenium were lower (p < 0.05) among the GDM group compared to the control group, whereas there was a statistically insignificant difference between the two groups, regarding the levels of copper, mercury, and arsenic (p > 0.05). Moreover, the monocyte to HDL ratio was higher in the GDM group (p < 0.05), and the insulin resistance was significantly higher as well (p < 0.05). The results of our study demonstrated that environmental factors could be effective in the etiology of GDM. Toxic heavy metals, through inducing Cu, OS, and chronic inflammation, and other trace elements, either directly by impacting insulin secretion or through weakening the body's antioxidant defense system, could play a role in the occurrence of GDM.