Gardner’s previous deal was set to expire at the end of the season.
The 23-year-old central midfielder spent the last campaign on loan at both Brighton & Hove Albion and Nottingham Forest in the Championship.
Gardner said: “I am delighted to sign this new deal and extend my time with this great club.
“I am looking forward to working with the gaffer going-forward and being someone he can turn to and do a job for the team.
“I enjoyed my time on loan but now I’m determined to make an impact this season with Villa and show everyone what I’m capable of.”