We report the existence of metallic two-dimensional electron gases (2DEGs) at the (001) and (101) surfaces of bulk-insulating TiO2 anatase due to local chemical doping by oxygen vacancies in the near-surface region. Using angle-resolved photoemission spectroscopy, we find that the electronic structure at both surfaces is composed of two occupied subbands of d_xy orbital character. While the Fermi surface observed at the (001) termination is isotropic, the 2DEG at the (101) termination is anisotropic and shows a charge carrier density three times larger than at the (001) surface. Moreover, we demonstrate that intense UV synchrotron radiation can alter the electronic structure and stoichiometry of the surface up to the complete disappearance of the 2DEG. These results open a route for the nano-engineering of confined electronic states, the control of their metallic or insulating nature, and the tailoring of their microscopic symmetry, using UV illumination at different surfaces of anatase.