The results saw Luis Enrique's side retake the leadership with a game in hand, just a week before they entertain Atletico in the Camp Nou stadium, reports Xinhua.
Messi provides the breakthrough
Barcelona had to dig deep on Saturday to assure a 2-1 win away to Malaga, who deserved more from the game after being the better side for long periods.
A goal from Munir in the first minute and a second from Lionel Messi 10 minutes after the break gave Barcelona all three points against a rival who had them in big trouble in the first half and had levelled the scores through a Juan Pablo Anor goal just before halftime.
Barcelona improved after the break as Malaga tired following their first half efforts.
Atletico fail to beat Sevilla
Atletico dropped two points at home to Sevilla, despite playing against 10 men for half an hour after Sevilla midfielder Vitolo was sent off for two yellow cards with coach Unai Emery following him into the stands as a result of his protests.
Despite playing with a man less, Sevilla were well organised at the back and held on as Atletico lacked creativity in midfield and attack.
Real salvage a draw
Real Madrid could only draw 1-1 away to Real Betis on Sunday. Alvaro Cejudo put Betis in front in the seventh minute and it needed a goal from Karim Benzema after a clear offside from James Rodriguez with 20 minutes remaining to assure a share of the points.
Real are now four points behind Barcelona with an extra game played.
Other matches from Week 21
Valencia coach Gary Neville is still searching for his first win after seven league games after managing a last-gasp 1-1 draw with Deportivo la Coruna.
It was another poor display that was rescued by a 93rd minute equalising goal by Alvaro Negredo on Sunday. Deportivo led through Lucas Perez in the 27th minute.
Aritz Aduriz scored two spectacular volleys as Athletic Club Bilbao defeated neighbours, Eibar 5-2 in an exciting Basque derby.
Borja Baston opened the scoring for Eibar in the fourth minutes, but inspired by Aduriz's wonderful first goal, Athletic turned the score around and led 3-1 at the break after headers from Sabin Merino and Aymeric Laporte.
A Baston penalty brought Eibar back into things after the break but another goal from Aduriz and an own goal meant Bilbao secured all three points.
Hosts Espanyol and Villarreal shared the points after Mateo Musacchio's late equaliser for the visitors.
Espanyol had twice taken the lead through Felipe Caicedo and former Villarreal striker, Gerard Moren, who was later sent off for protesting Villarreal's second goal. Espanyol were twice pegged back by strikes from Musacchio and Manu Trigueros.
Granada coach Jose Ramon Sandoval job was on the line but his team won 3-2 at home to Getafe.
Fran Rico and El Arabi put Granada 2-2 but quickfire goals from Stefan Scepovic and Moi Gomez drew Getafe level before Ruben Rochina's 77th-minute strike sealed it for the home side.
Finally, Rayo Vallecano ended their run of games without a win as they thrashed Celta Vigo 3-0 in Vallecas thanks to first half goals from Miku, Tito and Jozabed, who now has seven goals this season.