We show that the Aharonov-Bohm effect finds a natural description in the setting of QFT on curved spacetimes in terms of superselection sectors of local observables. The extension of the analysis of superselection sectors from Minkowski spacetime to an arbitrary globally hyperbolic spacetime unveils the presence of a new quantum number labeling charged superselection sectors. In the present paper we show that this topological quantum number amounts to the presence of a background flat potential which rules the behaviour of charges when transported along paths as in the Aharonov-Bohm effect. To confirm these abstract results we quantize the Dirac field in presence of a background flat potential and show that the Aharonov-Bohm phase gives an irreducible representation of the fundamental group of the spacetime labeling the charged sectors of the Dirac field. We also show that non-Abelian generalizations of this effect are possible only on space-times with a non-Abelian fundamental group.