Experimental evolution is a powerful method for testing fundamental questions in evolution and ecology. Horizontal gene transfer has been shown by comparative genomics to be important for microbial evolution. However, it has been difficult to carry out evolution experiments that track the flow of genetic elements into evolving populations of microbes. This means that many of the lessons learned from the field of experimental evolution may not apply in natural populations. Here we use a new model for experimental evolution – Helicobacter pylori – which is able to take up DNA that is added to its growth media. We use whole population metagenomics sequencing to confirm that these genes are taken up by the evolving population, and then track them over 200 generations of evolution. We find that gene flow from outside the population, and between individuals, allows for the introgression and maintenance of neutral or mildly deleterious alleles. We measure the fitness effects of thousands of genetic variants in media with and without antibiotic and find that abrogation of many gene targets is strongly deleterious in multidrug environments but neutral in antibiotic-free conditions. This study shows how horizontal gene transfer can potentiate antibiotic resistance and suggests a new set of genetic targets for antimicrobial strategies.