From measuring absorption spectra of cerium-doped Gd3Al2Ga3O12 (Ce:GAGG) and undoped GAGG crystals at low temperatures under UV-light irradiation, we find that they exhibit a broad band at around 12000 cm%1. This band is enhanced by high-temperature annealing under a hydrogen atmosphere. On the basis of present experimental results, the UV-induced band is assigned to shallow electron traps of defect complexes associated with oxygen vacancies. The UV-induced band completely disappears with Mg2+ codoping. We conclude that the Mg2+ codoping has the effect of inhibiting the formation of shallow electron traps, which realizes a faster scintillation response of Ce:GAGG.