Cross-linked gel polymer electrolytes containing aluminum oxide nanoparticles are prepared by in situ chemical cross-linking after injection of the gel precursor into the dye-sensitized solar cell (DSSC). This makes it possible to directly solidify the electrolyte in the cell and maintain good interfacial contacts between the electrolyte and the electrodes without suffering loss of performance in the DSSC. These gel polymer electrolytes exhibit high ionic conductivity and favorable charge transfer reaction at the interfaces of electrodes and electrolyte. The quasi-solid-state DSSC assembled with optimized gel polymer electrolyte exhibited remarkably high conversion efficiency, 6.34% at 100mWcm−2, and better long-term stability, as compared to the DSSC with liquid electrolyte.