Congenital HCMV infection is a leading infectious cause of long-term neurodevelopmental sequelae. Infection of newborn mice with mouse cytomegalovirus (MCMV) intraperitoneally is a well-established model of congenital human cytomegalovirus infection, which best recapitulates the hematogenous route of virus spread to brain and subsequent pathology. Here, we used this model to investigate the role, dynamics, and phenotype of CD8+ T cells in the brain following infection of newborn mice. We show that CD8+ T cells infiltrate the brain and form a pool of tissue-resident memory T cells (TRM cells) that persist for lifetime. Adoptively transferred virus-specific CD8+ T cells provide protection against primary MCMV infection in newborn mice, reduce brain pathology, and remain in the brain as TRM cells. Brain CD8+ TRM cells were long-lived, slowly proliferating cells able to respond to local challenge infection. Importantly, brain CD8+ TRM cells controlled latent MCMV and their depletion resulted in virus reactivation and enhanced inflammation in brain.