Gestational diabetes mellitus (GDM) is a complication of pregnancy strongly associated with an increased risk of structural fetal abnormalities. As the fetal heart grows quickly during the late-term pregnancy period, it is important to understand fetal heart growth before birth. This study explored how GDM affects fetal heart growth by evaluating basic echocardiography indicators during late pregnancy. This prospective, longitudinal study included 63 GDM patients (GDM group) and 67 healthy pregnant women (control group). All subjects underwent fetal echocardiography scans at gestational weeks 28-32, 32-36, and 36-40. Twelve echocardiographic indicators were assessed at each observation and analyzed by using a mixed model. The left atrial diameter (LA) and left ventricular end-diastolic diameter (LV) similarly increased from the first to the third observation. The right ventricular end-diastolic diameter (RV) was significantly different between the groups, and a group × time interaction was detected. The tricuspid annular peak systolic velocity (s') increased more rapidly in the GDM than the control group during the first to second observations, and the group × time interaction was significant. The increase in the tricuspid annular plane systolic excursion (TAPSE) of the GDM group was "slow-fast", while that of the control group was "fast-slow", during three observations. After adjusting covariates, the group difference and interaction effect of TAPSE and RV remained significant. The differences in fetal right heart indicators between the GDM and control groups suggest that GDM may affect the structure and functional growth of the fetal right heart during late-term pregnancy.