Ilkay Gundogan scored a stoppage-time penalty to give Barcelona a 2-1 win at Las Palmas and close the gap at the top of LaLiga.
After Barca saw defender Joao Cancelo forced off early on with a knee injury, Munir El Haddadi put the Canary Islanders ahead against his former club.
Ferran Torres equalised soon after the restart before Gundogan slotted in a dramatic late winner from the penalty spot after being pushed over by Daley Sinkgraven, who was shown a red card, to leave Barca seven points behind leaders Real Madrid and Girona.
Brazil forward Vitor Roque was named on the bench after Barcelona received league clearance on the 18-year-old forward’s 40million euro (£35m) move from Athletico Paranaense.
There was an early injury worry for Barca when Cancelo was forced off for some treatment on a knee problem. Although the Portugal defender came back on, he did not last long and was replaced by Andreas Christensen.
Las Palmas soon took the lead in the 12th minute when former Barca striker El Haddadi swept in a low cross from fellow Blaugrana old boy Sandro Ramirez.
Barca looked for a swift response as defender Alejandro Balde got clear down the left, but his ball into the penalty area was cleared behind.
Sandro tested Barca keeper Inaki Pena with an angled drive at the near post following another fluid counter attack by the hosts.
Las Palmas continued to press, with Pena first making a smart save from Javier Munoz’s rising drive before Sandro’s deflected effort from the rebound hit the base of the post.
There was a slight delay at the start of the second half as the bottom of the goal net which Barcelona would be attacking needed some repairs.
Barca threatened when Raphinha fired over from the edge of the penalty area.
The equaliser eventually came in the 55th minute when the ball took a couple of fortuitously defections through the Las Palmas penalty area and fell to Torres, who slotted into the bottom corner.
Frenkie De Jong fired straight at Las Palmas goalkeeper Alvaro Valles after being set up by the busy Gundogan.
Barca boss Xavi made a change for the closing 20 minutes, as Robert Lewandowski was replaced by Joao Felix and Lamine Yamal came on for Raphinha.
Las Palmas went close when Mika Marmol glanced a header wide from a corner before Roque was handed his Barca debut in the 79th minute, coming on for Torres.
Just when it looked like Barca would have to settle for a point, Las Palmas substitute Sinkgraven bundled over Gundogan at the far post as the midfielder looked to head the ball in – and was shown a straight red card.
Gundogan picked himself up and took the resulting penalty himself to calmly slot in a stoppage-time winner before Roque stabbed a late chance wide from six yards.