The Treaty on the Functioning of the European Union (TFEU - Article 19) allows the European Union to put in place legislation combatting discrimination based on age.
Article 10 TFEU foresees that the Commission shall aim to combat discrimination when defining and implementing all its policies and activities. The Commission has made explicit this commitment in the 2008 Communication "Non-discrimination and equal opportunities: A renewed commitment", which establishes the framework for the Commission to carry out different activities aiming to fight against discrimination on different grounds, including age.
The Charter of Fundamental Rights of the EU brings together in a single document the fundamental rights protected in the EU. Its Article 21 explicitly prohibits discrimination based on age.