All humans become infected with multiple herpesviruses during childhood. After clearance of acute infection, herpesviruses enter a dormant state known as latency. Latency persists for the life of the host and is presumed to be parasitic, as it leaves the individual at risk for subsequent viral reactivation and disease. Here we show that herpesvirus latency also confers a surprising benefit to the host. Mice latently infected with either murine gammaherpesvirus 68 or murine cytomegalovirus, which are genetically highly similar to the human pathogens Epstein-Barr virus and human cytomegalovirus, respectively, are resistant to infection with the bacterial pathogens Listeria monocytogenes and Yersinia pestis. Latency-induced protection is not antigen specific but involves prolonged production of the antiviral cytokine interferon-γ and systemic activation of macrophages. Latency thereby upregulates the basal activation state of innate immunity against subsequent infections. We speculate that herpesvirus latency may also sculpt the immune response to self and environmental antigens through establishment of a polarized cytokine environment. Thus, whereas the immune evasion capabilities and lifelong persistence of herpesviruses are commonly viewed as solely pathogenic, our data suggest that latency is a symbiotic relationship with immune benefits for the host.