Having prevailed 4-1 in the reverse fixture two weeks ago, Villa set up an opportunity where they would not be able to be passed by last season's semi-finalists if they could win on Thursday night.
However, Villa endured a far more difficult night than they did in the Netherlands, going behind early in the second half thanks to a Vangelis Pavlidis goal.
Although Villa came back into the contest, their equaliser was fortuitous, the referee wrongly awarding the Premier League side a corner that was headed in by Diego Carlos.
With nine minutes remaining, Ollie Watkins chipped in with a header of his own to complete the comeback, securing Villa a third triumph in four fixtures in Group E.
As a result, Villa sit six points clear of each of AZ and Zrinjski Mostar with two matches left, with a two-goal triumph for the latter being required to prevent Villa from qualifying for the knockout stages.
Next up for Villa is a home clash with Legia Warsaw, who are level on points with Villa but top the group courtesy of their 3-2 win over the English side in Poland on matchday one.
While Emery will be eager to finish in first place and avoid a last-32 tie, the Spaniard hinted that he was relieved that his side were on the brink of a top-two spot when they could have ended the night level on points with AZ.
Speaking to TNT Sports, Emery said: "Very important, very difficult match. We knew we needed to respect them and try to play at Villa Park.
"They scored the first goal. We scored one that was offside more or less. I'm very proud of our work in this competition. We're getting better.
"AZ are a very good team. I'm very happy. Legia are doing very well. We are excited to play the next game here."
Villa play host to Fulham in the Premier League on Sunday afternoon ahead of the November international break.