Everton took the lead inside the first minute thanks to a sublime acrobatic effort from Dominic Calvert-Lewin.
Gylfi Sigurdsson floated in a free-kick and the Gunners defence failed to deal with the danger. The ball hit David Luiz on the back, and Calvert-Lewin’s instinctive overhead-style effort found the bottom corner.
The goal seemed to give the visitors confidence and Alex Iwobi fired wide from the edge of the area, but the Gunners also had their chances and Nicolas Pepe was denied by Everton keeper Jordan Pickford.
Arsenal drew level on 27 minutes through Eddie Nketiah as he volleyed home a perfect cross from Bukayo Saka, who had only been on the pitch for nine minutes as a replacement for the injured Sead Kolašinac.
The hosts completed the turnaround six minutes later as Aubameyang slotted home after being set free by David Luiz but Everton restored parity in the closing stages of the first half.
Arsenal were unable to deal with a corner and Yerry Mina managed to get his head to the ball. Richarlison stretched and managed to flick the ball beyond stopper Bernd Leno to ensure the two sides went in level at 2-2 at the break.
The Gunners took the lead with their first attack of the second half as Pepe’s cross was headed home by Aubameyang.
That proved to be the winner, although Richarlison came close to rescuing a point for Everton but Leno was equal to his effort on 78 minutes and Calvert-Lewin headed wide in injury time.
The result sees Arsenal move above Everton and into ninth spot, seven points adrift of Chelsea in fourth and four behind Manchester United in fifth.
The visitors are a point worse off in 11th spot but they were able to call on Andre Gomes for the first time since November as he featured as a second-half substitute on his return to action after a serious ankle injury.