Liquid electrolytes in dye-sensitized solar cells (DSSCs), while effective in minimizing recombination of TiO2 conduction band with redox couple (I−/I3−), suffer from leakage and evaporation issues, hindering commercialization. Although solid-state electrolytes were introduced as an alternative, their performance is constrained by poor electrode contact. To solve these issues, gel polymer electrolytes (GPE) have been formulated based on guar gum (GG) crosslinked with poly (ethylene glycol) (PEG 200) incorporating potassium iodide (KI) as the doping salt. The incorporation of PEG 200 into the GPE allows a stable gel polymer electrolyte to form by using dimethyl sulfoxide (DMSO) as the organic solvent. The GPE boasts a structure free from leakage, showcases captivating ionic conductivity and thermal stability. Comprehensive structural and thermal analyses, including Fourier Transform Infrared spectroscopy (FTIR), Differential Scanning Calorimeter (DSC), and Thermogravimetric Analysis (TGA) have been carried out. The electrochemical properties of the GPE were also studied via Electrical Impedance Spectroscopy (EIS) and are significantly enhanced with higher concentration of KI introduced into the GPE. The highest ionic conductivity (σ) value of 9.76 × 10−3 S cm−1 is obtained in the GPE contained 40 wt% KI, with an efficiency of 5.65 %. Importantly, this study introduces a better and effective approach for designing electrolyte materials with high ionic conductivity, efficiency, and stability in DSSC.