Derek McInnes’s men defended stubbornly in a goalless first half which was characterised by some wayward shooting by the home side.
Midfielder David Zurutuza, however, broke through the red resistance (53) before substitute Sergio Canales doubled that lead (68) with a long-range shot – and it might have been worse had keeper Jamie Langfield not made a late save from substitute Imanol Agirretxe, who then missed another chance after hitting the woodwork.
Although a two-goal deficit is not a disaster, Aberdeen will have to come up with something special if they are to rescue the tie in the return game at Pittodrie next week.
The Dons went into the tie at the Anoeta on a high following their 2-1 aggregate win over Dutch side Groningen in the last round.
However, as the first half unfolded the Spanish side, a step up in class again, began to find their rhythm and pushed and prodded, looking to find the gap in the Aberdeen defence.
Langfield was hardly under siege as his defence restricted opposition chances and efforts from home skipper Xabi Prieto and Markel Bergara were off target.
But the home side should have gone ahead in the 34th minute when former Celtic target Alfred Finnbogason latched on to a header from Chory Castro but he knocked the ball over the bar from close range.
Another let-off came moments later when midfielder Ruben Pardo slashed at the ball from 12 yards and cleared the bar by some distance, leaving the Scottish Premiership side happy to go into the break level.
However, when Zurutuza scored eight minutes after the interval, prodding the ball past Langfield after the Dons defence could not clear, the complexion of the tie changed.
Aberdeen brought on Andrew Considine for Peter Pawlett on the hour in a bid to repel the attacks but they soon nearly fell further behind when Bergara struck the top of the bar from 25 yards after robbing Barry Robson in midfield.
Considine then gifted Sociedad the ball midway inside his half but Langfield got down to hold the shot from Canales.
But Canales found his range moments later as he unleashed a rocket past Langfield from 25 yards.
There did not seem to be much danger when the substitute, on minutes earlier for Castro, collected a pass in between the Dons midfield and defence but he fired a powerful left-footed drive just inside the post.
The Dons had a half-chance for a crucial away goal when they got a free-kick 28 yards out but Low struck the wall with his effort and the hosts were soon back on the attack and were unlucky not to strike again as Inigo Martinez headed against the bar.
Langfield then saved the Dons when a defensive blunder from Shay Logan allowed Agirretxe to latch on to a long ball over the top. The striker never really got the ball down properly though and Langfield was quickly out to block.
And Agirretxe then had a great chance in injury-time when he beat Considine to a cross, but the forward sliced high and wide.