While modern clinical practices like cesarean sections and perinatal antibiotics have improved infant survival, treatment with broad-spectrum antibiotics alters intestinal microbiota and causes dysbiosis. Infants exposed to perinatal antibiotics have an increased likelihood of life-threatening infections, including pneumonia. Here, we investigated how gut microbiota sculpt pulmonary immune responses, promoting recovery and resolution of infection in newborn rhesus macaques. Early-life antibiotic exposure, mirroring current clinical practices, interrupted the maturation of intestinal commensal bacteria and disrupted the developmental trajectory of the pulmonary immune system as assessed by single-cell proteomic and transcriptomic analyses of the pulmonary immune response. Early-life antibiotic exposure rendered newborn macaques susceptible to bacterial pneumonia, mediated by profound changes in neutrophil senescence, inflammatory signaling, and macrophage dysfunction. Pathogenic reprogramming of pulmonary immunity was reflected by a hyperinflammatory signature in all pulmonary immune cell subsets. Distinct patterns of immunoparalysis, including dysregulated antigen presentation in alveolar macrophages, impaired costimulatory function in T helper cells, and dysfunctional cytotoxic responses in natural killer (NK) cells, were coupled with a global loss of tissue-protective, homeostatic pathways in lungs of dysbiotic newborns. Fecal microbiota transfer corrected the broad immune maladaptations and protected against severe pneumonia. These data demonstrate the importance of intestinal microbiota in programming pulmonary immunity. Gut microbiota promote balance between pathways driving tissue repair and inflammatory responses, thereby leading to clinical recovery from infection in infants.