Santi Cazorla’s first La Liga goals since 2012 stunned Real Madrid and stole struggling Villarreal a 2-2 draw at Estadio de la Cerámica.

The former Arsenal midfielder struck twice – including an 82nd-minute equaliser – as Real slumped to an eighth league game without victory in 17 games this season, leaving them seven points adrift of the leaders, Barcelona.

Cazorla has relaunched his injury-hit career back in Spain this season, returning to his homeland after a six-year stint with the Gunners that was cut short by a terrible run of injuries. And the 34-year-old found the net in Spanish top-flight action for the first time since scoring for Málaga in a 1-1 draw at Osasuna on 23 April, 2012, when he put Villarreal ahead after four minutes on Thursday night.

Cazorla bent a wonderful shot into the bottom corner to ignite a game rescheduled due to Real’s participation in last month’s Club World Cup. But the European champions struck back three minutes later with a headed goal from Karim Benzema after a sweeping attacking move. Raphaël Varane gave the visitors the lead in the 20th minute with a header from a free-kick but Cazorla had the final say when he ghosted into the box undetected to nod home at the back post and give his side a deserved point in the new coach Luis García Plaza’s first home game in charge.

Santi Cazorla rises to head Villarreal’s late equaliser past Thibaut Courtois. Photograph: Quality Sport Images/Getty Images

Gareth Bale was withdrawn at half-time in another blow to Real, having appeared to struggle with a possible left calf complaint late in the first half.

“It could be said the result was fair,” Real’s coach, Santiago Solari, said. “We chased the victory and had it in our hands. We wanted to kill the game off and they put us under a lot of pressure as they were at home and they badly needed the points. When Gareth came off we lost a bit of sharpness in attack, we still had the chance to score a couple but we needed to attack with more clarity.”

Villarreal, who have reached the last 32 of the Europa League despite a dire domestic season, clawed their way out of the relegation zone to 17th in the standings, level on points with 18th-placed Athletic Bilbao. “This result will give us strength,” said García, who has taken two points from two games since succeeding the sacked Javi Calleja. “I imagine that every game from now on will be a battle, a war to survive, but hopefully we’ll come through it and this point gives us a big emotional boost.”