Envelope glycoprotein that plays a role in host cell entry, cell to-cell virus transmission, and fusion of infected cells. May be involved in the initial attachment via binding to heparan sulfate together with the gM/gN complex that binds heparin with higher affinity. Interacts with host integrin ITGB1, PDGFRA and EGFR that likely serve as postattachment entry receptors. Participates also in the fusion of viral and cellular membranes leading to virus entry into the host cell. Membrane fusion is mediated by the fusion machinery composed at least of gB and the heterodimer gH/gL. Homotrimer; disulfide-linked. Binds to heparan sulfate proteoglycans. Interacts with gH/gL heterodimer (By similarity). Interacts with host TLR1 and TLR2. Interacts with host C-type lectin CD209/DC-SIGN. Interacts with host ITGB1, EGFR, and PDGFRA. During virion morphogenesis, this protein probably accumulates in the endosomes and trans-Golgi where secondary envelopment occurs. It is probably transported to the cell surface from where it is endocytosed and directed to the trans-Golgi network (TGN). A proteolytic cleavage by host furin generates two subunits that remain linked by disulfide bonds. Belongs to the herpesviridae glycoprotein B family.