The Belgium international's late, curling free kick sealed all three points for the Toffees as they overcome a resilient and dogged Villans side which had taken a first-half lead.Everton, which came from a goal down to beat Aston Villa 2-1 at Goodison Park and keep pace in the race for the top four.
Everton took control early on, with Aiden McGeady cutting inside and smashing the post with a wickedly curling effort, but fell behind against the run of play to Leandro Bacuna's strike mid-way through the first half following a swift break.
Roberto Martinez's side continued to push forward and duly claimed a vital winner, as Mirallas curved a vicious free kick beyond the reach of Guzan and just under the crossbar to take all three points.
There was no place in the Everton squad for Lacina Traore, who was introduced to the home fans before kickoff following his loan arrival from Monaco, but McGeady made his first Premier League start for the home side and went agonizingly close to breaking the deadlock in the opening two minutes.
Cutting inside from the right, the Republic of Ireland international unleashed a superb curling effort from the edge of the penalty area that struck the left-hand post.
Everton dominated possession in the opening stages, but struggled to cause Villa goalkeeper Brad Guzan too many problems in the wake of McGeady's early strike.
The 27-year-old – signed from Spartak Moscow during the January transfer window – was also responsible for the game's first shot on target, but his low drive was comfortably collected by Guzan.
Having not troubled Tim Howard at all for the opening 30 minutes, it was Villa which took the lead when Christian Benteke slid in Bacuna and the Dutchman slotted beyond the Everton stopper from close range for his fourth goal of the season and second in as many matches.
Fabien Delph dispossessed Ross Barkley superbly in the middle of the park in the build-up to the goal.
Martinez brought Pienaar on in place of Barkley for the second half as Everton went in search of an equalizer and Leon Osman blazed across goal 10 minutes in, missing out on a seventh career goal against Villa.
Pienaar pulled the trigger from 20 yards shortly after the hour mark, but his fizzing effort only succeeded in stinging the palms of Guzan.
Everton finally pulled level in the 74th minute, when Naismith burst into the penalty area to latch onto Pienaar's cutely flicked through ball and poke beyond the Villa goalkeeper.
Mirallas completed the comeback five minutes from time with a wonderful set-piece finish, giving Everton its first Premier League double over Aston Villa and pushing the club up to fifth place in the league table.