Populations are shifting their phenology in response to climate change, but these shifts are often asynchronous among interacting species. Resulting phenological mismatches can drive simultaneous changes in natural selection and population demography, but the links between these interacting processes are poorly understood. Here we analyse 37 years of data from an individual-based study of great tits (Parus major) in the Netherlands and use mixed-effects models to separate the within- and across-year effects of phenological mismatch between great tits and caterpillars (a key food source for developing nestlings) on components of fitness at the individual and population levels. Several components of individual fitness were affected by individual mismatch (i.e. late breeding relative to the caterpillar food peak date), including the probability of double-brooding, fledgling success, offspring recruitment probability and the number of recruits. Together these effects contributed to an overall negative relationship between relative fitness and laying dates, that is, selection for earlier laying on average. Directional selection for earlier laying was stronger in years where birds bred on average later than the food peak, but was weak or absent in years where the phenology of birds and caterpillars matched (i.e. no population mismatch). The mean number of fledglings per female was lower in years when population mismatch was high, in part because fewer second broods were produced. Population mismatch had a weak effect on the mean number of recruits per female, and no effect on mean adult survival, after controlling for the effects of breeding density and the quality of the autumnal beech (Fagus sylvatica) crop. These findings illustrate how climate change-induced mismatch can have strong effects on the relative fitness of phenotypes within years, but weak effects on mean demographic rates across years. We discuss various general mechanisms that influence the extent of coupling between breeding phenology, selection and population dynamics in open populations subject to strong density regulation and stochasticity.