Symbiotic microbes impact the function and development of the central nervous system (CNS); however, little is known about the contribution of the microbiota during viral-induced neurologic damage. We identify that commensals aid in host defense following infection with a neurotropic virus through enhancing microglia function. Germfree mice or animals that receive antibiotics are unable to control viral replication within the brain leading to increased paralysis. Microglia derived from germfree or antibiotic-treated animals cannot stimulate viral-specific immunity and microglia depletion leads to worsened demyelination. Oral administration of toll-like receptor (TLR) ligands to virally infected germfree mice limits neurologic damage. Homeostatic activation of microglia is dependent on intrinsic signaling through TLR4, as disruption of TLR4 within microglia, but not the entire CNS (excluding microglia), leads to increased viral-induced clinical disease. This work demonstrates that gut immune-stimulatory products can influence microglia function to prevent CNS damage following viral infection.