For a long time it looked like this would be another miserable 90 minutes to go with Tuesday's 4-0 defeat by Liverpool, with Leandro Bacuna giving Villa a shock lead in the 34th minute.
But Everton ramped up the pressure in the second half and got their reward when Naismith struck 16 minutes from time and only four minutes after his entrance as a substitute.
Mirallas then had the final word with a stunning free-kick in the 85th minute to get Everton's top-four challenge back on track.
Former Celtic winger Aiden McGeady made his first ever Barclays Premier League start, and he almost opened the scoring inside three minutes.
A free-kick from Leighton Baines was cleared out to the right by Villa where McGeady picked the ball up, cut inside and curled a shot beyond the reach of Brad Guzan and against the far post.
It was desperately unlucky for the hosts, but did not prove to be a sign of things to come.
New signing Lacina Traore was introduced on the pitch before kick-off but is still a week or so away from a possible debut because of a hamstring injury.
Romelu Lukaku was also absent with the ankle problem he picked up in the derby, which left Everton boss Roberto Martinez without a recognised striker.
The Spaniard opted for Mirallas in attack but the Belgian struggled to get into the game, and Villa looked extremely comfortable defending in numbers on the edge of their penalty area.
Villa were offering very little in attack, but from their first chance in the 34th minute they scored.
Ross Barkley was trying to do too much when he got the ball, and he paid for it when a tackle from Fabian Delph robbed him of possession 30 yards out.
Bacuna picked up the ball and played a one-two with Christian Benteke before slotting the ball past Tim Howard from a tight angle.
The full-back has shown a real eye for goal since joining Villa from FC Groningen in the summer, and this was his fourth strike in the Premier League and second in two games.
A few Everton fans voiced their displeasure at half-time, and Martinez reacted to his side's struggles by replacing Barkley with Steven Pienaar for the second half.
The South African offered support to Mirallas, and immediately Everton looked more of a threat.
With 55 minutes gone, Leon Osman robbed Ashley Westwood on the edge of the area but could only screw his shot across the face of goal.
The frustration for the home fans now was that their team were not creating the chances to match their dominance, with Villa proving resolute in defence.
With 20 minutes left, Martinez sent on Naismith for full-back John Stones, and moments later the hosts nearly found their equaliser.
Baines' free-kick was not well dealt with by Villa and the ball hit Benteke in the face before dropping agonisingly wide of the post.
But in the 74th minute they finally pulled level, and it was substitute Naismith who provided a composed finish.
Former Villa man Gareth Barry played the ball in to Pienaar on the edge of the box and his lovely flick sent Naismith clean through, with the Scot giving Guzan no chance.
Everton immediately set about chasing a winner, and they found it with five minutes left.
Mirallas had had a torrid game up front but when he was fouled 30 yards out by Ciaran Clark he stepped up and curled the ball beyond Guzan and into the net.
Baines has made such situations his speciality but the full-back watched on in admiration this time.
Naismith should then have made it 3-1 but the substitute directed a free header straight at Guzan.
Villa tried to respond and substitute Marc Albrighton let fly from distance, but his shot was deflected just over and that proved to be the final chance.