Sociedad stun nine-man Barca
Barca seemed to be cruising when a Patrick Kluivert goal handed them the lead after 33 minutes.
However, Darko Kovacevic equalised for the league leaders five minutes before the break and he wrapped up the points with a second on 53 minutes.
In an explosive finale, Louis van Gaal's team then had both Motta and Marc Overmars sent off.
The defeat leaves Barca languishing in tenth place, some ten points behind Sociedad.
Surprise-package Mallorca battled hard at the Riazor after being forced to play 70 minutes with just ten men. They eventually drew 2-2 in a thrilling encounter with Deportivo La Coruna.
The point sees the Islanders edge back ahead of Valencia - who played earlier - into second spot.
Dutchman Roy Makaay continued his exceptional recent form by bagging a double, but a goal from Walter Pandiani, who is on loan to Mallorca from Depor, and a Samuel Eto'o penalty saw the visitors grab a deserved point after they had Ariel Ibagaza sent off.
Valencia remain in third following their goalless draw at mid-table Alaves.
There were plenty of goalscoring chances in an entertaining clash, but neither side could find the vital breakthrough.
However, the reigning champions suffered a blow when Spanish international goalkeeper Santiago Canizares was stretchered off after 15 minutes with a knee injury, following a collision with Jordi Cruyff.
Celta Vigo put the disappointment of their mid-week Uefa Cup defeat to Celtic behind them by moving up to fourth with a 2-0 at Real Valladolid.
Brazilian striker Catanha scored the first goal after just 10 minutes and compatriot Edu made the points safe for the Galicians with a second eight minutes after the interval.
Real Betis jumped to fifth just behind Celta with a hard-fought 1-0 triumph over a dogged Athletic Bilbao side.
The all-important goal arrived with sixteen minutes remaining, courtesy of Brazilian summer signing Marcos Assuncao.
Malaga seemed to be suffering from a Uefa Cup hangover and had two men sent off as they went down to a 1-0 defeat against Racing Santander at the Sardinero.
Josemi and Fernando Sanz were the men who saw red, as on-loan Pedro Munitis grabbed Racing's winner after 33 minutes.
Meanwhile, Villarreal eased their relegation worries with a narrow 1-0 home success over fellow strugglers Recreativo de Huelva.
In a game that always looked destined to be settled by one goal, Victor popped up in the 64th minute to claim the match-winner for the 'Yellow Submarines'.
Defeat leaves Recreativo rooted to the bottom of the table as Espanyol climbed two places to 18th with a 3-1 victory at the Olympic Stadium over Rayo Vallecano, who consequently slip to second bottom.
Raul Tamudo grabbed a brace for the Catalans and Savo Milosevic made the points safe for Espanyol in the final minute after Alex Fernandez had brought Vallecano back into the match late on with an own-goal.
Click below for match stats:
La Liga
Alaves 0-0 Valencia
Deportivo La Coruna 2-2 Mallorca
Espanyol 3-1 Rayo Vallecano
Racing Santander 1-0 Malaga
Real Betis 1-0 Athletic Bilbao
Real Sociedad 2-1 Barcelona
Real Valladolid 0-2 Celta Vigo
Villarreal 1-0 Recreativo
Click here for an updated La Liga table.