Pre-pregnancy obesity and excessive gestational weight gain (GWG) appear to affect birth weight and the offspring’s risk for obesity and disease later in life. However, the identification of the mediators between this relationship, could be of clinical interest, taking into account that there are other confounding factors, such as genetics and other shared influences. The aim of this study was to evaluate the metabolomic profile of infants at birth (cord blood) and 6 and 12 months after birth to identify offspring metabolites associated to maternal GWG. Nuclear Magnetic Resonance (NMR) metabolic profiles have been measured in 154 plasma samples from newborn (82 cord blood samples) and from 46 and 26 of them at 6 months and 12 months of age, respectively. The levels of relative abundance of 73 metabolomic parameters have been determined in all the samples. We performed univariate and machine-learning analysis of the association between metabolic levels and maternal weight gain adjusted for mother age, Body Mass Index (BMI), diabetes, and diet adherence and for infant sex. Overall, our results show differences, both at univariate level and in the machine-learning models, in the offspring according to tertiles of maternal weight gain. Some of these differences are resolved at 6 and 12 months of age whereas some other remain. Lactate and leucine are the metabolites with the strongest and longest association with maternal weight gain during pregnancy. Leucine, as well as other significant metabolites, have been associated in the past with metabolic wellness in both general and obese population. Our results suggest that metabolic changes associated to excessive GWG are present in children since early life.