Fast electron transport, large specific surface area, and slow interfacial electron recombination are indispensable features for efficient photoelectrodes of dye-sensitized solar cells (DSSCs). Highly ordered TiO2 nanotubes (TNT) with advanced architecture of high surface-to-volume ratio and open-up geometry for providing direct electron/ion transport channels is applied on a flexible photoanode in this study. Because several micrometers of semiconductor are required for the diffusion of electrons, which are surrounded by electron acceptors at a distance of only several nanometers, a wide band gap barrier layer of Y2O3 is coated on TNT to retard back-transfer of electrons to the electrolyte or to the oxidized dye molecules by electrodepositing Y(OH)3 on the TNT surfaces and subsequently annealing the samples. By adjusting the charge capacity for Y(OH)3 electrodeposition, the charge recombination dynamics in the pertinent DSSC can be easily controlled. This barrier layer also enhances dye adsorption and therefore increases the volume of the optically active component due to the more basic surface of Y2O3 for more carboxyl groups in a dye molecule adsorbing onto the surface. A higher light-to-power conversion efficiency (η) of 6.52% is obtained for the pertinent DSSC compared with a reference cell with non-coated TNT (η = 5.35%), exhibiting an enhancement of 22% in η.