Hospital-acquired pneumonia is a major cause of morbidity and mortality. The incidence of hospital-acquired pneumonia remains high globally and treatment can often be ineffective. Here, we review the available data and unanswered questions surrounding hospital-acquired pneumonia, discuss alterations of the respiratory microbiome and of the mucosal immunity in patients admitted to hospital, and explore potential approaches to stratify patients for tailored treatments. The lungs have been considered a sterile organ for decades because microbiological culture techniques had shown negative results. Culture-independent techniques have shown that healthy lungs harbour a diverse and dynamic ecosystem of bacteria, changing our comprehension of respiratory physiopathology. Understanding dysbiosis of the respiratory microbiome and altered mucosal immunity in patients with critical illness holds great promise to develop targeted host-directed immunotherapy to reduce ineffective treatment, to improve patient outcomes, and to tackle the global threat of resistant bacteria that cause these infections.