It is widely believed that predation moderates interspecific competition and promotes prey diversity. Still, in models of two prey sharing a resource and a predator, predator-mediated coexistence occurs only over narrow ranges of resource productivity. These models have so far ignored the widespread feature of ontogenetic diet shifts in predators. Here, we theoretically explore the consequences of a diet shift from juvenile to adult predator stages for coexistence of two competing prey. We find that only very minor deviations from perfectly identical diets in juveniles and adults destroy the traditional mechanism of predator-mediated coexistence, which requires an intrinsic trade-off between prey defendedness and competitive ability. Instead, predator population structure can create an emergent competition-predation trade-off between prey, where a bottleneck in one predator stage enhances predation on the superior competitor and relaxes predation on the inferior competitor, irrespective of the latter's intrinsic defendedness. Pronounced diet shifts therefore greatly enlarge the range of prey coexistence along a resource gradient. With diet shifts, however, coexistence usually occurs as one of two alternative states and, once lost, may not be easily restored.