We investigate the nature of the accelerated particles responsible for the production of the gamma-ray emission observed from the middle-aged supernova remnant (SNR) HB 21. The analysis of more than nine years of Fermi LAT data leads to the observation of an extended emission positionally in agreement with the SNR HB 21. The bulk of this gamma-ray emission is detected from the remnant; photons up to $sim$10,GeV show clear evidence of curvature at the lower energies. The remnant is characterized by an extension of $0^{circ}.83$, that is, 30% smaller than claimed in previous studies. The increased statistics allows us also to resolve a point-like source at the edge of the remnant, in proximity to a molecular cloud of the Cyg OB7 complex. In the southern part of the remnant, a hint of an additional gamma-ray excess in correspondence to shocked molecular clouds is observed. The spectral energy distribution of the SNR shows evidence of a break around 400 MeV, which can be properly fitted within both the hadronic and leptonic scenario. The pion-decay mechanism reproduces well the gamma rays, postulating a proton spectrum with a slope $sim 2.5$ and with a steepening around tens of GeV, which could be explained by the energy-dependent escape of particles from the remnant. In the leptonic scenario the electron spectrum within the SNR matches closely the locally measured spectrum. This remarkable and novel result shows that SNR HB 21 could be a direct contributor to the population of Galactic electrons. In the leptonic scenario, we find that the local electron spectrum with a break around 2 GeV, closely evokes the best-fitting parental spectrum within this SNR. If such a scenario is confirmed, this would indicate that the SNR might be a source of Galactic background electrons.