The risk applies even to normal weight babies weighing between 5.5 to 8.8 pounds at birth and suggests obesity gets passed on in the womb.
Previous studies found excess weight gain and elevated blood sugar during pregnancy increase a woman’s risk of delivering a large baby who is more likely to become an obese child.
But until now there wasn’t much evidence that these risk factors also affected normal-weight babies.
Children of mothers who had elevated blood sugar during pregnancy were at higher risk for childhood obesity.
But for children of mothers who had gestational diabetes - the highest level of elevated blood sugar --were at the greatest increased risk.
Those children were at least 30 per cent more likely to be overweight or obese between the ages of two and 10, compared to children whose mothers had normal blood sugar.
Children of mothers who gained 40 pounds or more during pregnancy were at least 15 per cent more likely to be overweight or obese between the ages of two and 10, compared to children whose mothers gained less than 40 pounds.
The Kaiser Permanente Centre for Health Research study followed more than 24,000 mothers and their children over 10 years
All of the mothers gave birth to normal weight babies between 1995 and 2003.
The mother’s medical records were compared to their child’s records.
Lead author clinical assistant professor Dr Teresa Hillier said: “When women have elevated blood sugar and gain excess weight during pregnancy, it seems to change the baby’s metabolism to ‘imprint’ the baby for childhood obesity.
“We’re not sure yet of the exact mechanism of this change, but it appears the baby is adapting to an overfed environment, whether from glucose or extra weight.”
She added many other behavioural and environmental factors contribute to childhood obesity, including the baby not being breastfed, a child’s poor eating and exercise habits, and lack of access to healthy foods and safe areas to play.
More than one-third of US babies will become overweight or obese as children and adolescents, according to the Centers for Disease Control and Prevention.
She not this study showed that the effect in the womb on the baby’s metabolism may be as important as what happens after the child is born.
Endocrinologist Prof Hillier said: “We can’t wait until the baby is born to determine and address the impact on childhood obesity.
“We need to intervene during the mom’s pregnancy to help her with nutritional and lifestyle changes that will result in healthy weight gain, healthy blood sugar and ultimately, healthy children.”
The study was published in Maternal and Child Health Journal.