The human gastrointestinal (GI) tract is a unique environment in which intestinal epithelial cells and non-pathogenic (commensal) bacteria co-exist. This equilibrium is perturbed by the entry of pathogens into the GI tract. A key step in the infection process is the navigation of the pathogen through the commensal bacterial layer to attach to epithelial cells. It has been proposed that the microenvironment that the pathogen encounters in the commensal layer plays a significant role in determining the extent of attachment and colonization. Current culture methods for investigating pathogen colonization are not well suited for investigating this hypothesis as they do not enable co-culture of bacteria and epithelial cells in a manner that mimics the GI tract microenvironment. Here we report the development of a microfluidic co-culture model that enables independent culture of eukaryotic cells and bacteria, and testing the effect of the commensal microenvironment on pathogen colonization. A pneumatically-actuated system was developed to form reversible islands that allow development of bacterial biofilm along with culture of an epithelial cell monolayer. The co-culture model used to develop a commensal Escherichia coli biofilm among HeLa cells, followed by introduction of enterohemorrhagic E. coli (EHEC) into the commensal island, in a sequence that mimics the sequence of events in GI tract infection. Using wild-type E. coli and a tnaA mutant (lacks the signal indole) as the commensal bacteria, we demonstrate that the commensal biofilm microenvironment is a key determinant of EHEC infectivity and virulence. Our model has the potential to be used in fundamental studies investigating the effect of GI tract signals on EHEC virulence as well as for screening of different probiotic strains for modulating pathogen infectivity in the GI tract.