The present invention provides an isolated peptide having an amino acid residue sequence that comprises at least one human cytomegalovirus glycoprotein B (HCMV-gB) sequence segment, each HCMV-gB sequence segment consisting of at least 8 and not more than 60 consecutive amino acid residues from residues 146 to 315, residues 476 to 494 of SEQ ID NO: 1, or from a sequence variant of residues 146 to 315 or 476 to 494 of SEQ ID NO: 1 that has at least 70% sequence identity thereto. The peptides of the invention are useful for treating, preventing, or inhibiting a herpesvirus (e.g., Herpes Simplex Virus-1, Human Cytomegalovirus, and the like) infection in a subject.