Phenotypic heterogeneity can confer clonal groups of organisms with new functionality. A paradigmatic example is the bistable expression of virulence genes in Salmonella typhimurium, which leads to phenotypically virulent and phenotypically avirulent subpopulations. The two subpopulations have been shown to divide labor during S. typhimurium infections. Here, we show that heterogeneous virulence gene expression in this organism also promotes survival against exposure to antibiotics through a bet-hedging mechanism. Using microfluidic devices in combination with fluorescence time-lapse microscopy and quantitative image analysis, we analyzed the expression of virulence genes at the single cell level and related it to survival when exposed to antibiotics. We found that, across different types of antibiotics and under concentrations that are clinically relevant, the subpopulation of bacterial cells that express virulence genes shows increased survival after exposure to antibiotics. Intriguingly, there is an interplay between the two consequences of phenotypic heterogeneity. The bet-hedging effect that arises through heterogeneity in virulence gene expression can protect clonal populations against avirulent mutants that exploit and subvert the division of labor within these populations. We conclude that bet-hedging and the division of labor can arise through variation in a single trait and interact with each other. This reveals a new degree of functional complexity of phenotypic heterogeneity. In addition, our results suggest a general principle of how pathogens can evade antibiotics: Expression of virulence factors often entails metabolic costs and the resulting growth retardation could generally increase tolerance against antibiotics and thus compromise treatment.