Understanding the mechanisms controlling the generation and maintenance of biodiversity provides some of the planet's greatest and most pressing challenges. Variation in resource concentration, which varies widely at multiple scales, may cause biodiversity to increase, decrease, or exhibit a unimodal response and underlying mechanisms remain obscure. We established experimental cultures of long-term stationary phase (LTSP) Escherichia coli to test whether per capita heterozygosity varies with resource concentration, and, if so, whether population sizes associated with different resource concentrations contributed to these patterns. Our results provide the clearest example to date of increasing per capita heterozygosity with increasing resource concentration. Further, our experimental manipulations of population size, independent of resource concentration, provide the first unequivocal evidence that population size is one of the underlying factors controlling per capita heterozygosity along such resource gradients. Specifically, we show that cultures with higher maximum population sizes, associated with higher resource concentrations, have higher per capita heterozygosity. These experiments provide the first experimental evidence for an underappreciated factor controlling biodiversity along resource gradients-population size. This direct evidence of population size influencing diversification rates has implications for regional and global scale patterns of biodiversity.