Understanding how populations and communities respond to competition is a central concern of ecology. A seminal theoretical solution first formalised by Levins (and re-derived in multiple fields) showed that, in theory, the form of a trade-off should determine the outcome of competition. While this has become a central postulate in ecology it has evaded experimental verification, not least because of substantial technical obstacles. We here solve the experimental problems by employing synthetic ecology. We engineer strains of Escherichia coli with fixed resource allocations enabling accurate measurement of trade-off shapes between bacterial survival and multiplication in multiple environments. A mathematical chemostat model predicts different, and experimentally verified, trajectories of gene frequency changes as a function of condition-specific trade-offs. The results support Levins' postulate and demonstrates that otherwise paradoxical alternative outcomes witnessed in subtly different conditions are predictable.