Emerging evidence indicates that the gut microbiome can modulate metabolic homeostasis, and thus may influence the development of gestational diabetes mellitus (GDM). However, whether and how the gut microbiome and its correlated metabolites change in GDM is uncertain. Herein we compare the gut microbial compositions, and fecal and urine metabolomes, of 59 patients with GDM versus 48 pregnant healthy controls (HCs). We showed that the microbial and metabolic signatures of GDM patients were significantly different from those of HCs. Compared to HCs, the GDM subjects were characterized by enriched bacterial operational taxonomic units (OTUs) of the family Lachnospiraceae, and depleted OTUs of the families Enterobacteriaceae and Ruminococcaceae. Some altered gut microbes were significantly correlated with glucose values and fetal ultrasonography indexes. Moreover, we identified four fecal and 15 urine metabolites that discriminate GDM from HC. These differential metabolites are mainly involved in carbohydrate and amino acid metabolism. Significantly, co-occurrence network analysis revealed that Lachnospiraceae and Enterobacteriaceae bacterial OTUs formed strong co-occurring relationships with metabolites involved in carbohydrate and amino acid metabolism, suggesting that disturbed gut microbiome may mediate GDM. Furthermore, we identified a novel combinatorial marker panel that could distinguish GDM from HC subjects with high accuracy. Together our findings demonstrate that altered microbial composition and metabolic function may be relevant to the pathogenesis and pathophysiology of GDM.