Gel polymer electrolytes (GPEs) are considered as a promising solution to replace organic liquid electrolytes for safer lithium (Li) batteries due to their high ionic conductivity comparable to liquid electrolytes, no risk of leakage, and high flexibility. However, poor interfacial contact between electrodes and GPEs leads to high interfacial impedance and unsatisfactory electrochemical performance. The emerging in situ synthesized GPEs can fully infiltrate into porous electrodes and form intimate interfaces, improving interfacial contact and electrochemical performance. This perspective covers recent advances of in situ GPEs in design, synthesis, and applications in lithium (Li) batteries. Polyester and polyether-based GPEs are mainly discussed followed by a brief introduction of GPEs with other polymer matrices, such as poly(ionic liquid)s, cyanoethyl polyvinyl alcohol, poly(vinyl acetal) and single-ion conductors. Then, the recent progress in Li batteries using in situ GPEs are summarized, including Li-ion battery, Li-metal battery, Li-sulfur battery, and Li-air battery. Finally, the remaining challenges and future perspectives of in situ GPEs are discussed. We hope this perspective can offer guidance for in situ synthesis of GPEs and facilitate their applications in high-performance Li batteries.