The invention discloses a gel dressing for preventing and treating human papillomavirus infection. The gel dressing is prepared by taking a CP protein, carbomer, carboxylated chitosan, glycerol and Arabic gum as main raw materials, wherein the mass percentages of the raw materials are as follows: 0.01-0.1% of the CP protein, 0.1-1% of the carbomer, 0.1-1% of the carboxylated chitosan, 5-15% of theglycerol, 0.5-3% of the Arabic gum and the balance of water. According to the invention, the CP protein is used as a main effective component, and the whole CP protein is negatively charged, can be combined with HPV viruses to inactivate the HPV viruses, and has repair capability on damaged tissues. The invention also discloses an application of the gel dressing in preparing medicaments for preventing and treating human papillomavirus infection.