The band alignment at an Al2O3/SrTiO3 heterointerface forming a two-dimensional electron gas (2DEG) was investigated using scanning photocurrent microscopy (SPCM) in an electrolyte-gated environment. We used a focused UV laser source for above-the-bandgap illumination on the SrTiO3 layer, creating electron-hole pairs that contributed to the photocurrent through migration towards the metal electrodes. The polarity of the SPCM signals of a bare SrTiO3 device shows typical p-type behavior at zero gate bias, in which the photogenerated electrons are collected by the electrodes. In contrast, the SPCM polarity of 2DEG device indicates that the hole carriers were collected by the metal electrodes. Careful transport measurements revealed that the gate-dependent conductance of the 2DEG devices exhibits n-type switching behavior. More importantly, the SPCM signals in 2DEG devices demonstrated very unique gate-responses that cannot be found in conventional semiconducting devices, based on which we were able to perform detailed investigation into the electronic band alignment of the 2DEG devices and obtain the valence band offset at the heterointerface.