The 23-year-old Republic of Ireland international was set to become a free agent at the end of June but, despite suffering disappointment in the play-offs for a second straight season, he has opted to challenge for promotion with the Dons next year.
He told the club's official website: "Before the play-offs I knew I wanted to stay. I do want to play at a higher level, but I want to do it with this team.
"I have been here for three years now, I have made a lot of friends and I am settled in the area. I want to get into the Championship with this team and with the manager (Karl Robinson).
"The last two years have really hurt so I want to put it right. It is driving me on to stay clear of the play-offs and hopefully go up automatically."
Gleeson made 46 appearances for the Dons last season, scoring five goals.