In vitro systems have provided great insight into the mechanisms of antibiotic resistance. Yet, in vitro approaches cannot reflect the full complexity of what transpires within a host. As the mammalian gut is host to trillions of resident bacteria and thus a potential breeding ground for antibiotic resistance, we sought to better understand how gut bacteria respond to antibiotic treatment in vivo . Here, we colonized germ-free mice with a genetically barcoded antibiotic pan-susceptible Escherichia coli clinical isolate and then administered the antibiotic cefepime via programmable subcutaneous pumps which allowed for closer emulation of human parenteral antibiotic pharmacokinetics/dynamics. After seven days of antibiotics, we were unable to culture E. coli from feces. We were, however, able to recover barcoded E. coli from harvested gastrointestinal (GI) tissue, despite high GI tract and plasma cefepime concentrations. Strikingly, these E. coli isolates were not resistant to cefepime but had acquired mutations â€" most notably in the wbaP gene, which encodes an enzyme required for the initiation of the synthesis of the polysaccharide capsule and lipopolysaccharide O antigen - that increased their ability to invade and survive within intestinal cells, including cultured human colonocytes. Further, these E. coli mutants exhibited a persister phenotype when exposed to cefepime, allowing for greater survival to pulses of cefepime treatment when compared to the wildtype strain. Our findings highlight a mechanism by which bacteria in the gastrointestinal tract can adapt to antibiotic treatment by increasing their ability to persist during antibiotic treatment and invade intestinal epithelial cells where antibiotic concentrations are substantially reduced.