Inconsistent Sociedad are unlikely to match last season's feat of a Champions League place but their Mexico international Vela showed their quality in attack by lobbing goalkeeper Jaime Jimenez after a through ball from Ruben Pardoa after 23 minutes.
Relieved Sociedad coach Jagoba Arrasate said: "It was important to win after our (4-3) defeat by Almeria (on Monday) and we are aware that it is harder with each game to win, so for that reason we are happy. Still we can do things better."
After 30 games both teams are in a strong position to qualify for the Europa League with Sociedad on 49 points while Villarreal have 48 after an early goal from Jeremy Perbet against Getafe gave them their first win in five attempts.
Promoted Villarreal took the top flight by storm earlier this season with open, attractive football but injuries in recent weeks have destabilised their bid for a place in Europe.
Still they managed to end their poor run with Perbet turning well in the box and firing home with five minutes on the clock.
Elsewhere, bottom side Real Betis beat Levante 3-1 away and another mid-table side Valencia drew 2-2 with lowly Almeria.
Atletico Madrid lead the way atop La Liga on 73 points after beating Granada on Wednesday and are a point clear of defending champions Barcelona, who defeated Celta Vigo, while Real Madrid are three points off the pace after they lost at Sevilla.
- Sports & Recreation