The mammalian gut ecosystem has considerable influence on host physiology, but the mechanisms that sustain this complex environment in the face of different stresses remain obscure. Perturbations to the gut ecosystem, such as through antibiotic treatment or diet, are at present interpreted at the level of bacterial phylogeny. Less is known about the contributions of the abundant population of phages to this ecological network. Here we explore the phageome as a potential genetic reservoir for bacterial adaptation by sequencing murine faecal phage populations following antibiotic perturbation. We show that antibiotic treatment leads to the enrichment of phage-encoded genes that confer resistance via disparate mechanisms to the administered drug, as well as genes that confer resistance to antibiotics unrelated to the administered drug, and we demonstrate experimentally that phages from treated mice provide aerobically cultured naive microbiota with increased resistance. Systems-wide analyses uncovered post-treatment phage-encoded processes related to host colonization and growth adaptation, indicating that the phageome becomes broadly enriched for functionally beneficial genes under stress-related conditions. We also show that antibiotic treatment expands the interactions between phage and bacterial species, leading to a more highly connected phage-bacterial network for gene exchange. Our work implicates the phageome in the emergence of multidrug resistance, and indicates that the adaptive capacity of the phageome may represent a community-based mechanism for protecting the gut microflora, preserving its functional robustness during antibiotic stress.