Valencia, expected to challenge Sociedad for a top-four finish next May, lost 3-1 at Espanyol despite having taken an early lead though Helder Postiga.
Sociedad impressed in their 2-0 Champions League playoff first leg win at Olympique Lyonnais in midweek but were second best for much of the game at Elche.
Playing their first home game back in the top-flight, the hosts took the lead after two minutes when a corner flashed across the area and Ferran Corominas stabbed the ball in at the back post.
Sociedad were lucky not to concede again and struggled to get into the game until Elche’s earlier efforts started to take their toll in the second half.
A cross from the right found Vela unmarked in the area after 74 minutes and the Mexico forward scuffed a shot inside the far post.
Former Arsenal striker Vela then curled a long-range effort against the crossbar near the end.
Sociedad play their return match at home to Lyon this Wednesday.
Espanyol made a strong start against Valencia and had already missed three gilt-edged chances to score when, against the run of play, the visitors took the lead in the 10th minute.
Jonas laid the ball off for Postiga and the Portugal striker, brought in to replace Tottenham Hotspur new boy Roberto Soldado, netted his first goal for the club.
Espanyol levelled when David Lopez nodded in a corner in the 32nd minute and Cristian Stuani put them in front with a header which flew in off the far post past a stationary Diego Alves two minutes into the second half.
The hosts were lucky to still have 11 men on the pitch after Simao caught Adil Rami in the face with his elbow but they successfully foiled a Valencia side struggling to click under new coach Miroslav Djukic.
With two minutes to go French forward Thievy Bifouma thundered a shot into the top corner for Espanyol.
(Reporting by Mark Elkington, editing by Rex Gowar)