Dietary variation among individuals and cohorts can have a major impact on how populations adapt to environmental variation. Although variation in diet between cohorts and across habitats has been well studied in many taxa that feed on few or easily observed food items, the same is not true for most birds, especially smaller generalist passerines whose feeding habits are predominantly cryptic. For these and similar species, DNA metabarcoding can be used to good effect but remains underutilised. Here we used DNA metabarcoding with next-generation sequencing to assess spatio-temporal dietary variation among age and sex cohorts of the great tit Parus major, a model species in avian ecology. We identified animal prey throughout the year, and plants in winter, across different habitat fragments, achieving sample completeness of >90% for most analyses. There was considerable variation in dietary richness and composition among seasons and years, and diet composition varied between coniferous and mixed-deciduous habitats. Invertebrate prey were more species rich in mixed-deciduous habitats than in coniferous, primarily in winter, but when plants were also included there were no differences between habitat types in species richness. “Rare” species dominated the diet accounting for 30% of prey items across all samples. In winter, first year birds consumed more invertebrate species than adults. Beech (Fagus) was also almost twice as prevalent in the diets of first years (96% vs 52% in adults). Most differences between ages and sexes seemed driven primarily by differences in rare species, which we speculate is caused by divergent foraging modes and microhabitat use. We discuss the likely mechanisms for the patterns observed, all of which suggest considerable spatio-temporal variation in diet among cohorts. Our results also highlight that understanding the role of food in driving phenological phenomena requires consideration of dietary variation over space, time and between consumers.