Disruption of the lung endothelial-epithelial cell barrier following respiratory virus infection causes cell and fluid accumulation in the air spaces and compromises vital gas exchange function1. Endothelial dysfunction can exacerbate tissue damage2,3, yet it is unclear whether the lung endothelium promotes host resistance against viral pathogens. Here we show that the environmental sensor aryl hydrocarbon receptor (AHR) is highly active in lung endothelial cells and protects against influenza-induced lung vascular leakage. Loss of AHR in endothelia exacerbates lung damage and promotes the infiltration of red blood cells and leukocytes into alveolar air spaces. Moreover, barrier protection is compromised and host susceptibility to secondary bacterial infections is increasedwhenendothelialAHR is missing. AHR engages tissue-protective transcriptional networks in endothelia, including the vasoactive apelin-APJ peptide system4, to prevent a dysplastic and apoptotic response in airway epithelial cells. Finally, we show that protective AHR signalling in lung endothelial cells is dampened by the infection itself. Maintenance of protective AHR function requires a diet enriched in naturally occurring AHR ligands, which activate disease tolerance pathways in lung endothelia to prevent tissue damage. Our findings demonstrate the importance of endothelial function in lung barrier immunity. We identify a gut-lung axis that affects lung damage following encounters with viral pathogens, linking dietary composition and intake to host fitness and inter-individual variations in disease outcome.