Background There is an increased risk of depressive symptoms in women with gestational diabetes mellitus (GDM). Poor maternal mental health can impact the mother-infant relationship which can cause problems in the perinatal period. However there is little research which examines the mother-infant relationship in women with GDM. Aims To test the hypotheses that 1) GDM is associated with a perceived difficult mother-infant relationship in the first year of an infant's life in a cohort of women recruited in pregnancy compared to mothers who do not have GDM and 2) poor maternal mental health mediates the relationship between GDM and the mother-infant relationship Study design A retrospective analysis of a Scottish cohort database using mediation analysis. Subjects The dataset included 5,289 women (n=204 GDM, n=5,085 no GDM). Outcome measures The Maternal Postnatal Attachment Scale measured the mother-infant relationship. The SF-12 Mental Health Component Score measured maternal mental health. Results GDM does not predict maternal mental health (path a). Poor maternal mental health is significantly associated with a perceived difficult mother-infant relationship (path b). The direct effect of GDM on the mother-infant relationship (path c) was not statistically significant. The indirect effect of GDM on the mother-infant relationship via maternal mental health (mediator) was also not significant. Conclusion This is the first robust study examining the impact of GDM on the mother-infant relationship. The study did not support the hypotheses, however the results are of theoretical value, especially in the context of limited research.