Treatment for late preterm and term babies currently involved extra feeding and repeated blood tests to measure blood sugar levels.
However, many babies were admitted to intensive care and given intravenous glucose because their blood sugar remained low.
The research was carried out at Auckland University's Liggins Institute and at Waikato Women's Hospital in Hamilton and has been published in the international medical journal The Lancet.
The Sugar Babies Study was designed to assess whether treatment with dextrose gel was more effective than feeding alone at reversing neonatal hypoglycaemia in at-risk babies - including those from pregnancies complicated by maternal diabetes, preterm birth, and low birthweight.
Between 2008 and 2010, 514 at-risk babies aged 35 weeks gestation or older from Waikato Women's Hospital were enrolled in the first 48 hours after birth.
Of those, 242 (47 per cent) became hypoglycaemic and were randomly assigned to 40 per cent dextrose gel or placebo gel for up to six doses over 48 hours.
Treatment with dextrose almost halved the likelihood of treatment failure, compared with the placebo, with no adverse effects.
Babies given dextrose gel were also less likely to be admitted to intensive care for hypoglycaemia, to receive additional formula feeds, and to be formula fed at two weeks.
Professor Harding said in the past, babies with hypoglycaemia were given formula in the first few hours after birth, and if that did not work, then they were admitted to intensive care and put on a drip.
"The dextrose gel improves the rate of breast feeding and we think this might be because babies stay with their mothers, and are not given formula in the first few hours to manage their hypoglycaemia."
Because the treatment was inexpensive and simple to administer, it should be considered for first-line management of late preterm and term hypoglycaemic babies in the first 48 hours after birth, she said.
"Dextrose gel can easily be made in the hospital pharmacy, and is stable at room temperature. Therefore, the gel could also be useful in resource-poor settings where hypoglycaemia is common and underdiagnosed.
"This is exciting, because the treatment is a simple, cheap and safe option that can be used anywhere," Professor Harding said.
Dr Neil Marlow from the Institute for Women's Health at University College London said dextrose gel had been recommended 20 years ago, but a previous randomised trial did not show differences, and for most services the use of buccal dextrose, even as an emergency stop-gap, has fallen into disuse.