Women who gain too much or too little weight during their pregnancy are more likely to have an overweight child, according to a recent study.