There are defining moments in every football club's season and it felt Everton's had arrived the moment Kevin Mirallas lined up a 25-yard free-kick in the 85th minute against Aston Villa. It was 1-1, Roberto Martínez's team had reacted well to their Merseyside derby mauling but the victory that was imperative to restore Champions League momentum appeared elusive. Then Mirallas found the top corner.

Victory, Everton's first at home over Villa for eight seasons, was slender, hard-fought and just reward for a spirited second-half recovery by a Martínez team under pressure to prove Tuesday's 4-0 defeat at Liverpool was a mere aberration. The first half had suggested a hangover from Anfield. "We were too cagey, more concerned with the tactical aspect of our performance and it was the wrong example of how football should be played," the Everton manager said. The second half vindicated their quality and character.

"It was a great fightback, from our point of view the most satisfying victory of the season," added Martínez, after the substitute Steven Naismith levelled Leandro Bacuna's opener before Mirallas sealed the comeback. "When you hit the post and concede a goal at the other end, it becomes a real test of character. I couldn't be more proud of the second-half performance."

Paul Lambert felt the outcome unjust, citing a lack of clear-cut chances for Everton and Villa's defensive comfort for 74 minutes as reasons his side deserved a point. The Villa manager's performance analysis was correct. He fielded a three-man central defence with Bacuna and Ryan Bertrand dropping back whenever Everton took possession and, with the home side having to field Mirallas as the lone striker in the absence of Romelu Lukaku and Lacina Traoré, Martínez's team did struggle for clear-cut opportunities. But a makeshift Everton attack carried the game to Villa throughout the second half and the visitors' response was negligible.

"I thought for 70-odd minutes we were really comfortable and we never looked under threat in the first half," said Lambert. "Their first goal was a poor one from our point of view but the second was a world class free-kick. There is nothing you can do about them but I don't think we deserved to lose."

Villa were content to let Everton stroke the ball across midfield and strike on the counter, which they did to telling effect with their one and only chance. Fabian Delph instigated the breakthrough with a challenge on Ross Barkley that drew complaints from Everton players and fans alike. But Delph took the ball, allowing Bacuna to feed Christian Benteke, advance into the area and slot the return from the Belgium striker between the legs of Tim Howard.

Barkley was replaced by Steven Pienaar at the interval – "It was tactical," said Martínez – and there was far greater urgency to Everton's second-half display. The opening 45 minutes had produced only an Aiden McGeady curler that cannoned off the post with Brad Guzan beaten. Leighton Baines and Pienaar brought an immediate threat down the left and Leon Osman's influence grew when switched into the centre, but chances remained at a premium.

Osman created one for himself when he dispossessed Ashley Westwood and forced a finger-tip save from Guzan, while Benteke almost deflected a Baines' free-kick into his own goal. The second half was all Everton possession with Villa unable to counter and a merited equaliser arrived with 16 minutes left.

Naismith struck moments after replacing right-back John Stones and in the best way Everton could hope to break a five-man rearguard given the players in their attack. Naismith started the move with a lay-off to Gareth Barry who found Pienaar on the edge of the box. The Scotland international continued his run and, from a first-time flick through the heart of the defence by Pienaar, beat Guzan with a cool sidefoot finish.

A point would have done little for Everton's chances of closing in on the top four and, with Villa captain Ron Vlaar departing with a hamstring injury, they secured all three in stunning fashion. Mirallas won a free-kick and his tireless, often frustrating afternoon ended in glorious fashion when he swept the resulting set piece beyond Guzan's despairing dive. Hangover cured.