Spanish midfielder Sergio Busquets rescued Barcelona from a draw as he scored against Valencia with virtually the last kick of the game to get his side back within two points of La Liga leaders Real Madrid.
Barca looked set to lose ground in the title race but deep into injury time Lionel Messi set up Busquets to net his first goal for 14 months. Valencia slipped to fifth in La Liga after their first home defeat of the season.
Messi was struck on the head by something seemingly thrown from the crowd during the celebrations and was pictured rubbing his head afterwards, but appeared to be unhurt, The BBC reported.
It was a win that for so long looked unlikely, with Barca coach Luis Enrique having selected both Busquets and Javier Mascherano in central midfield, and the visitors suffered from a rare lack of creativity.
But Busquets justified the decision in dramatic style, following up to volley home from close range after Diego Alves had saved Neymar's header from a Messi cross.
Former Liverpool striker Luis Suarez had earlier missed Barca's best two opportunities and also had an effort incorrectly ruled out for off-side when turning in an attempted Dani Alves shot.
More From This Section
Valencia, who have not beaten Barcelona at home since 2007, had chances of their own to win it but for the second successive home game were unable to score.
With 20 minutes to go Bravo saved from Sofiane Feghouli and then thwarted on-loan Manchester City striker Alvaro Negredo.
Busquets became the unlikely match-winner to deny Valencia even a point and spark celebrations which saw Messi booked after he was hit on the head by an object as Barca players celebrated the dramatic winner, the report added.