The home side took the lead from a corner as they played the ball in short and Geoffrey Kondogbia turned his man and found Ivan Rakitic in the penalty area who slide the ball into the net from close range.
However, Sociedad were level in just minutes as Rakitic headed the ball into the his own net as he looped the ball over Beto from a free kick from Xabi Prieto.
The visitors took the lead in the 25th minute when Carlos Martinez cut inside on the right and lifted a dangerous ball into the area where Imanol Aggiritxe was there to fire into the bottom corner on the volley.
Alvaro Negredo went close for Sevilla before the break while Aggiritxe tested the handling of Beto, but Real maintained their lead at half time.
Negredo was again in the action early in the second half but he couldn't find a way past Claudio Bravo with headed efforts as the visitors backline held firm.
This decision incensed the Sevilla substitutes as they rushed over to the linesman. Jose Antonio Reyes's protest was deemed too strong by referee Alfonso Izqueirdo, who showed the forward a red card.
The home side kept pushing for an equaliser while Sociedad looked to hit them on the break but neither side could add a further goal, as the visitors earned precious three points in their Champions League qualification quest.