The home side had the better of the opening exchanges and almost took the lead in the second minute. David Zurutuza crossed for Imanol Agirretxe, but the striker sent his headed effort wide of goal.
As the half progressed Villarreal provided a greater attacking threat and went on to break the deadlock three minutes before the break. The home side failed to clear their lines and Marcos Senna was on hand to score from 12 yards out.
Sociedad dominated proceedings after the restart, creating numerous chances to equalise.
The levelling goal eventually arrived in the 86th minute courtesy of Arsenal loanee Vela, who converted a headed pass from Xabi Prieto.