Recently, prediction of gestational diabetes mellitus (GDM) using artificial intelligence (AI) from medical records has been reported. We aimed to evaluate GDM-predictive AI-based models using birth cohort data with a wide range of information and to explore factors contributing to GDM development. This investigation was conducted as a part of the Japan Environment and Children's Study. In total, 82,698 pregnant mothers who provided data on lifestyle, anthropometry, and socioeconomic status before pregnancy and the first trimester were included in the study. We employed machine learning methods as AI algorithms, such as random forest (RF), gradient boosting decision tree (GBDT), and support vector machine (SVM), along with logistic regression (LR) as a reference. GBDT displayed the highest accuracy, followed by LR, RF, and SVM. In the GBDT model, the area under the receiver operating characteristic curve for GDM was 0.67 (95% CI, 0.59–0.75) for mothers with GDM history and 0.76 (95% CI, 0.74–0.78) for mothers without GDM history. The results of decision tree-based algorithms, such as GBDT, have shown high accuracy, interpretability, and superiority for predicting GDM using birth cohort data.