Asthma is the most prevalent pediatric chronic disease and affects more than 300 million people worldwide. Recent evidence in mice has identified a "critical window" early in life where gut microbial changes (dysbiosis) are most influential in experimental asthma. However, current research has yet to establish whether these changes precede or are involved in human asthma. We compared the gut microbiota of 319 subjects enrolled in the Canadian Healthy Infant Longitudinal Development (CHILD) Study, and show that infants at risk of asthma exhibited transient gut microbial dysbiosis during the first 100 days of life. The relative abundance of the bacterial genera Lachnospira, Veillonella, Faecalibacterium, and Rothia was significantly decreased in children at risk of asthma. This reduction in bacterial taxa was accompanied by reduced levels of fecal acetate and dysregulation of enterohepatic metabolites. Inoculation of germ-free mice with these four bacterial taxa ameliorated airway inflammation in their adult progeny, demonstrating a causal role of these bacterial taxa in averting asthma development. These results enhance the potential for future microbe-based diagnostics and therapies, potentially in the form of probiotics, to prevent the development of asthma and other related allergic diseases in children.