Valencia had gone in front in the first half at the Camp Nou through a Diakhaby goal from a corner and Valencia could already see themselves regaining strength in the dressing room with that 0-1 in their favour.
But at the end of the first half, Griezmann, who had been slack for the Valencia goal, won a penalty. Gayà pushed him when he was about to score against Jaume Domenech.
Hernández Hernández initially showed the Valencia full-back a straight red. However, and amongst a lot of protests from Javi Gracia, the referee went to VAR to review the passage of play. He still gave a penalty, but changed the red to a yellow.
Messi stepped up, Jaume guessed his intentions and saved. But it didn't leave the box and, after a cross from Jordi Alba, the Argentine put it in from the six-yard box to make it 1-1.
With that goal, he equalled Pelé. The player scored his 643rd goal for Barca, the same that the Brazilian achieved at Santos.