Parasites exploit an inherently patchy resource, their hosts, which are discrete entities that may only be available for infection within a relatively short time window. However, there has been little consideration of how heterogeneities in host availability may affect the phenotypic or genotypic composition of parasite populations or how parasites may evolve to cope with them. Here we conduct a selection experiment involving an entomopathogenic nematode (Steinernema feltiae) and show for the first time that the infection rate of a parasite can evolve rapidly to maximize the chances of infecting within an environment characterized by the rate of host availability. Furthermore, we show that the parasite's infection rate trades off with other fitness traits, such as fecundity and survival. Crucially, the outcome of competition between strains with different infection strategies depends on the rate of host availability; frequently available hosts favor "fast" infecting nematodes, whereas infrequently available hosts favor "slow" infecting nematodes. A simple evolutionarily stable strategy (ESS) analysis based on classic epidemiological models fails to capture this behavior, predicting instead that the fastest infecting phenotype should always dominate. However, a novel model incorporating more realistic, discrete bouts of host availability shows that strain coexistence is highly likely. Our results demonstrate that heterogeneities in host availability play a key role in the evolution of parasite life-history traits and in the maintenance of phenotypic variability. Parasite life-history strategies are likely to evolve rapidly in response to changes in host availability induced by disease management programs or by natural dynamics in host abundance. Incorporating parasite evolution in response to host availability would therefore enhance the predictive ability of current epidemiological models of infectious disease.