In this paper, erbium-doped gadolinium oxide rare earth oxide nanoparticles (Gd2O3:Er3+) with good light absorption capacity from the visible to the infrared region were prepared by polyol method, and then compounded with TiO2 by hydrothermal method. SEM, TEM, XPS, UV–vis and electrochemical workstation were used to study the morphology, structure, UV–vis light absorption and photoelectrochemical (PEC) properties of Gd2O3:Er3+/TiO2. The results showed that the Gd2O3:Er3+ spherical nanoparticles with a particle size of about 15 nm were uniformly distributed on the surface of the TiO2 nanorod array, and the Gd2O3:Er3+/TiO2 nanocomposites had good light absorption capacity in the infrared region. Furthermore, the photocurrent densities of Gd2O3/TiO2 and Gd2O3:Er3+/TiO2 were 2.08 and 2.75 times higher than those of TiO2, respectively, manifesting that the broadening of infrared light absorption can improve the PEC property of TiO2. Meanwhile, the DFT calculation results showed that the energy band of Gd2O3:Er3+/TiO2 was significantly narrower than that of TiO2, indicating that Gd2O3:Er3+/TiO2 had a redshift phenomenon of UV–vis absorption. The calculation results of state density showed that the f orbital of Gd2O3:Er3+ intersected with the d orbital of TiO2, indicating that there is an electron transfer between Gd2O3:Er3+ and TiO2.