Villa took the lead on 20 minutes through Scotland midfielder John McGinn, with Brazilian striker Wesley putting them back in the lead barely two minutes after Nicolas Pepe had drawn Arsenal level from the penalty spot.
However, Arsenal, who had Ainsley Maitland-Niles sent off just before the break after he picked up two yellows, drew level again through Chambers's strike and then took the lead thanks to Aubameyang's sensational late free kick.
Arsenal made one change from the side that capitulated against Watford last weekend, young star Bukayo Saka rewarded for his exploits in the Europa League with a start ahead of Mesut Ozil.
Saka created a chance for Maitland-Niles early on, but the defender skewed it wide and Villa would then threaten through both McGinn and Egyptian winger Trezeguet before the former Hibernian midfielder opened the scoring.
Arsenal continued to dominate possession in the opening 45 minutes but it was Villa who had the better chances, with Wesley seeing his shot saved and defender Tyrone Mings heading wide from a corner.
The Gunners were reduced to 10 men on 41 minutes as Maitland-Niles, who had been booked on 11 minutes, picked up his second yellow after a poor challenge on Neil Taylor.
Arsenal surprisingly took off Saka, who had been their best player in the first half, for Chambers, and they eventually found a way back into the game on 58 minutes, when Bjorn Engels brought Matteo Guendouzi down in the area.
Ivorian winger Pepe dutifully converted the spot kick but Villa were back ahead just two minutes later, Wesley firing home from six yards after Jack Grealish had demonstrated some excellent footwork to beat three men before squaring it to the Brazilian.
Arsenal brought on Joe Willock and Lucas Torreira as they chased the game, but they only had wide efforts from David Luiz and Pepe to show for their efforts before Chambers drew them level from a corner on 81 minutes.
Guendouzi's corner found the former Southampton defender at the back post and, after beating one challenge, he fired home to level things up once again.
That goal spurred on the home side and their continued pressure was rewarded on 84 minutes when Belgian defender Engels brought down Aubameyang on the edge of the area and the Gabonese forward completed the comeback with a stunning strike that left Tom Heaton stranded.
Villa did press in the final 10 minutes and looked to have won a penalty of their own when Conor Hourihane's cross hit Sokratis's arm in the box, but nothing was given despite the decision going to VAR.
McGinn did have another chance to score towards the end, but he slipped in the area as Arsenal managed to see out the final few moments to secure a third league win in six games.
The result helps Arsenal end a run of three games without a win in the Premier League and pushes them up to fourth in the table, while Villa remain in the bottom three.
The Gunners return to action against Nottingham Forest on Tuesday in the EFL Cup, with Villa travelling to fellow top flight side Brighton & Hove Albion in the same competition a day later.
Arsenal (4-2-3-1): Leno; Maitland-Niles, Sokratis, Luiz, Kolasinac; Guendouzi, Xhaka (Willock 72'); Pepe, Ceballos (Torreira 72'), Saka (Chambers 45'); Aubameyang
Aston Villa (4-3-3): Heaton; Guilbert, Engels, Mings, Taylor; McGinn, Nakamba (Hourihane 85'), Grealish; Trezeguet (El Mohamady 68'), Wesley, El Ghazi (Lansbury 86')body check tags ::