In the absence of effective vaccines, human-infecting members of the Herpesvirus family cause considerable morbidity and mortality worldwide. Herpesvirus infection relies on receptor engagement by a gH/gL glycoprotein complex which induces large-scale conformational changes of the gB glycoprotein to mediate fusion of the viral and host membranes and infection. The instability of all herpesvirus gBs have hindered biochemical and functional studies, thereby limiting our understanding of the infection mechanisms of these pathogens and preventing vaccine design. Here, we computationally stabilized and structurally characterized the Epstein-Barr virus prefusion gB ectodomain trimer, providing an atomic-level description of this key therapeutic target. We show that this stabilization strategy is broadly applicable to other herpesvirus gB trimers and identified conformational intermediates supporting a previously unanticipated mechanism of gB-mediated fusion. These findings provide a blueprint to develop vaccine candidates for these pathogens with major public health burden.