Gross primary production (GPP) is the largest flux in the carbon cycle, yet its response to global warming is highly uncertain. The temperature sensitivity of GPP is directly linked to photosynthetic physiology, but the response of GPP to warming over longer timescales could also be shaped by ecological and evolutionary processes that drive variation community structure and functional trait distributions. Here, we show that selection on photosynthetic traits within and across taxa dampen the effects of temperature on GPP across a catchment of geothermally heated streams. Autotrophs from cold streams had higher photosynthetic rates and after accounting for differences in biomass among sites, rates of ecosystem-level GPP were independent of temperature, despite a 20 °C thermal gradient. Our results suggest that thermal adaptation constrains the long-term temperature dependence of GPP, and highlights the importance of considering physiological, ecological and evolutionary mechanisms when predicting how ecosystem-level processes respond to warming.