As someone who has been in exactly the same situation (found out my partner was 10 years older by seeing his passport), however it was only 1 month into the relationship.
Firstly don't be quick to just dump him like some people are saying, you should "know" your partner by now. Does he have a good heart? Is there something behind why he was keeping it a secret.
Many gay men lie about their age on their online profiles. It's very common especially among 'older' gays to shed off a few years, it's that stigma associated with ageism in the gay community. And then when you meet them and they you realise wow this isn't just a one night stand, they perhaps never can think of the right time to say hey I actually lied about my age in my profile!
Secondly, do confront him about it, in a nice way. I confronted my partner and we had a deep and meaningful. There were a few things he was hiding from me, nothing too major (that he had failed a university masters). He was ashamed about this and this is why he didn't tell me. That along with his age, and I guess the few years he felt he had 'wasted' and not getting anywhere.
Regardless of the point - still I think everyone deserves second chances. We are not perfect and we also need to learn from our mistakes. Being a certain age can be a big insecurity for some, so whilst I did acknowledge that I was disappointed he didn't tell me earlier - I also was understanding. We are really good now.
Hope that helps.