Barcelona survived a second-half Getafe fightback to secure a 2-1 win and ramp up the pressure on rivals Real Madrid.
Antoine Griezmann ended his LaLiga scoring drought with 33 minutes gone at the Nou Camp, before Sergi Roberto doubled the home side's advantage just six minutes later to leave Getafe facing an uphill task.
Substitute Angel Rodriguez pulled one back for the visitors shortly after the hour mark, and he then had an effort clawed off the line by goalkeeper Marc-Andre Ter Stegen.
But, despite a nervy end, Quique Setien's side managed to see out the match to move level on points with Real at the top of the table. Zinedine Zidane's men host Celta Vigo on Sunday.
Getafe have been the surprise package this season and headed into Saturday's encounter just one place behind their opponents following a run of four successive wins.
The visitors thought they had opened the scoring midway through the opening period when Allan Nyom followed up Jorge Molina's saved header to score past Ter Stegen.
But following a VAR review, the strike was chalked off after Nyom was adjudged to have fouled Samuel Umtiti in the build-up.
With 12 minutes remaining until the interval, Griezmann put the home side in front.
Lionel Messi's perfect pass found the former Atletico Madrid striker, who made no mistake with his finish, clipping the ball over Getafe keeper David Soria, to score in the league for the first time since netting in a 4-1 win against Alaves on December 21.
Barcelona appeared to have all-but killed the game after 39 minutes when Roberto scored just the second league goal of his career.
Roberto, whose only other league strike for Barca came in a 2-0 home win against Real Betis in August 2017, converted at the back post following Junior Firpo's cross.
It marked Barcelona's eighth league goal of the Setien era, and remarkably it was the first which Messi had played no part, either by scoring or laying on an assist.
Getafe boss Jose Bordalas introduced Rodriguez shortly after the break, and the substitute was soon on the scoresheet when he volleyed home Jaime Mata's cross with 66 minutes on the clock.
Moments later, Rodriguez, who has scored eight league goals as a substitute this term, provided the hosts with a real fright when his flicked-shot was stopped by Ter Stegen, who then prevented Mata from netting the rebound.
Setien's side were on the ropes but they did enough to take all three points and retain hope of defending their LaLiga title.
No Data Analysis info