Gestational diabetes happens about 20 to 28 weeks into a woman's pregnancy. It usually goes away after the pregnancy is over.