Barcelona, seeking to rebound from last week's 3-0 loss to Villarreal, had to wait until the 81st minute to get the winner from Samuel Eto'o, whose first-half penalty hit a post. Eto'o's headed goal came 20 minutes after Sociedad's Xavi Prieto was sent off when he received a second yellow card.
Just before the goal, Sociedad striker Kahveci Nihat broke away but saw his shot saved by Victor Valdes. The goalkeeper then poked away the ball as Nihat broke two minutes from the end.
``Valdes was our star without doubt,'' Barcelona's world player of the year Ronaldinho told the club's Web site. ``He gave us the three points.''
Nine-Point Lead
Barcelona has a nine-point lead over champion Valencia and a seven-point advantage over Real Madrid, which defeated Real Zaragoza 3-1 in the late match. Raul Gonzalez, Ronaldo and Michael Owen got Madrid's goals after David Villa put Zaragoza ahead in the 21st minute. Valencia earlier drew 0-0 at Osasuna.
In other Spanish matches, former Manchester United striker Diego Forlan scored twice in Villarreal's 4-2 win at Levante; Deportivo La Coruna, a Champions League semifinalist last season, drew 1-1 against last-place Numancia; and Luis Edu scored twice in Real Betis's 2-0 win over Mallorca.
Espanyol, seeking a Champions League spot, drew 1-1 at Athletic Bilbao. Albacete and Racing Santander tied 0-0.