Ousmane Dembele volleyed Barcelona to within one point of La Liga leaders Atletico Madrid with a dramatic injury time winner against 10-man Valladolid.

The French forward, whose position had been changed three times, as Ronald Koeman desperately tried to find a way to break down their stubborn opponents, swung his left foot at Frenkie De Jong’s cross after Ronald Araujo had flicked it on and it fizzed in at the near post.

Lionel Messi led the charge to mob the scorer. Barcelona had won a game they so nearly surrendered with a sloppy, complacent first half.

So poor was the opening 45 minutes that Messi’s words in the mouth of the tunnel at the start of the second half, picked up by television microphones, were clear: ‘We have to find another gear; we have to speed things up; we have to win this however we can. We have to increase the tempo or this is going to be complicated.’

It was complicated and until Demeble’s late-late strike it seemed they would throw away their chance to close the gap on Atletico.

Valladolid made the most of Barça’s poor start with four efforts on goal in the opening 25 minutes.

Kenan Kodro came closest heading Saidy Janko’s centre on to the crossbar after nine minutes and there were two two shots just over from Roque Mesa.

Messi had a free-kick chance and Dembele headed an Antoine Griezmann cross over but Koeman was exasperated on the touchline at his team’s poor start. Dembele selflessly pulled the back to Messi when he was in shooting range himself but Ruben Alcaraz slid in to block the shot as Barcelona improved as the half went on. To underline that, Pedri hit a shot from the edge of the area that Jordi Masip pushed on to his post just before the break.

After the pep talk from Messi the Barelona players came back out on to the pitch and there was a change in formation too with Frenkie De Jong, having played the first 45 minutes in a back three, now very much in midfield as Koeman switched to 4-3-3.

The front three almost combined to open the scoring with Messi sending Dembele clear. His shot was parried and Greizmann headed the rebound wide. The chance came just after Lucas Olaza tested Marc Andre Ter Stegen shooting into the side-netting.

Valladolid then claimed handball against Jordi Alba but although the ball had hit the left-back’s hand, Oscar Plano had struck it at him from a meter’s distance and the arm had been in a natural position.

At the other end Messi had free-kick chance having been brought down but his effort was saved by Masip.

Koeman made a triple change just after the hour with Francisco Trincao, Martin Braithwaite and Ronald Araujo coming on for Griezmann, Sergio Busquets and Oscar Mingueza.

With the changes Dembele was now playing left wing having started the game at centre-forward and moved to right wing at the break.

It was the Frenchman’s ball back to Messi that allowed him to send another shot whistling just wide. It was Barca’s 15th but still they had not breached former Barca B keeper Masip’s goal.

With nine minutes left Valladolid were reduced to ten minute when Dembele set-off on another mazy run and was chopped down from behind by Plano. It looked like a yellow but the card was red. Dembele stayed down because his momentum had sent him crashing head-first into the knee of Bruno Gonzalez.

Valladolid players surrounded referee Jaime Latre but he was not called to review the incident and instead when he approached the touchline it was to show another red to someone on the Valladolid bench.

They were furious at the decision and with two minutes of added time left they were head in hands again as Dembele turned a point into three and left Barcelona knowing that they can win the title by winning all their remaining games – starting on Saturday away at Real Madrid.