Arturo Vidal struck 11 minutes from time to earn Barcelona a 2-1 victory away at Leganes on Saturday.
Manager Ernesto Valverde has been under pressure since last season's Champions League semifinal exit to Liverpool and, despite sitting in first place, they only narrowly avoided dropping points for fifth time in 13 matches.
- ESPN La Liga fantasy: Sign up now!
- When does the transfer window reopen?
Youssef En-Nesyri opened the scoring for Leganes in superb fashion on 12 minutes when he fired in a superb effort from the right hand side of the box.
There was a potentially significant moment just after the half hour mark when Sergio Busquets picked up a booking for a foul on Roque Mesa which rules him out of the mammoth clash away to Atletico Madrid.
Barcelona went into half-time behind but were level on 53 minutes when Luis Suarez powered home a header from Lionel Messi's free kick.
With Barca pushing for a winner, Valverde opted to take off Antoine Greizmann just before the hour mark and replace him with Vidal. And it proved to be a decisive change.
On 79 minutes, Vidal fumbled home from close range and, following a consultation with the VAR, the goal stood and Barca took home all three points.