Gestational diabetes

I just failed my 3 hour glucose test. What happens if I have diabetes? Will the baby be in danger?