Pivotal to brain development and function is an intact blood-brain barrier (BBB), which acts as a gatekeeper to control the passage and exchange of molecules and nutrients between the circulatory system and the brain parenchyma. The BBB also ensures homeostasis of the central nervous system (CNS). We report that germ-free mice, beginning with intrauterine life, displayed increased BBB permeability compared to pathogen-free mice with a normal gut flora. The increased BBB permeability was maintained in germ-free mice after birth and during adulthood and was associated with reduced expression of the tight junction proteins occludin and claudin-5, which are known to regulate barrier function in endothelial tissues. Exposure of germ-free adult mice to a pathogen-free gut microbiota decreased BBB permeability and up-regulated the expression of tight junction proteins. Our results suggest that gut microbiota-BBB communication is initiated during gestation and propagated throughout life.