Juanmi gave Málaga the lead against Levante on Satyrday evening, but a hat-trick, including two penalties, from Barral and a late goal from Uche turned things around completely.
An underwhelming performance by Real Madrid saw them hammered 4-0 by city rivals Atlético on Saturday, their worst defeat since 2010.
With all the teams now having played the same number of games, Real Madrid lead the way in La Liga by four points after a 2-1 midweek victory over Sevilla.
Samu Castillejo scored the only goal of the match as Málaga registered a 1-0 victory over Valencia.
Barcelona twice came from behind to beat Villarreal 3-2 and record their eighth victory in a row.
Real Madrid march on with a 4-1 win over Real Sociedad, although they did go behind after just thirty-eight seconds from a goal by Elustondo.
Dani Parejo scored twice, one from the penalty spot, and Javi Fuego Martinez added a third as Valencia moved up to fourth in La Liga with a 3-1 victory over Sevilla.
Atlético Madrid stay in third place after a 3-1 win over Rayo Vallecano, Griezmann getting two and Manucho turning the ball into his own net for the third.
A penalty after just three minutes saw Córdoba take the lead against Real Madrid in a match which saw both sides reduced to ten men.
Suárez and Bacca scored to take Sevilla up to fourth in La Liga with a 2-0 win over Málaga in the late game on Sunday evening.