It was the first post-break win for Getafe, which had drawn three in a row after resuming with a loss at Granada.
“This win helps us regain our confidence,” Mata said.
It was the fifth straight game without a win for Sociedad since the pandemic break. It stayed in seventh place, seven points from Sevilla.
A pair of mistakes by Sociedad goalkeeper Álex Remiro led to Mata’s goals in the 20th and 83rd minutes. Remiro’s bad pass to a teammate prompted the first-half penalty kick converted by Mata, and in the second goal the goalkeeper couldn’t close his legs fast enough to keep the ball from going through.
Adnan Januzaj scored for Sociedad in the 55th after the linesman initially disallowed the goal for offside.
Getafe next visits leader Real Madrid on Thursday, while Sociedad hosts last-placed Espanyol.
More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports
Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.