Alves warns opponents: Don't make Messi angry
The champions initially struggled to contain a highly motivated Valencia at the Mestalla and looked in danger of dropping points for only the fourth time this season.
However, after squandering several opportunities he would normally have taken with aplomb, league top scorer Messi netted his 27th of the campaign in the 77th minute to stretch Barca's lead over Real Madrid at the top to 10 points.
"He missed a few which normally doesn't happen and he was a bit angry at half-time," Brazilian Alves told reporters. "And the worst thing that can happen is that Leo gets angry."
The World Player of the Year should have put the visitors ahead in the ninth minute but was denied three times in quick succession by some desperate defending.
The Argentina forward had another great chance when he was clean through in the 31st but his chipped effort landed on the roof of net.
Wednesday's strike took Messi's tally for the season in all competitions to 43, including a hat-trick against Sevilla in the Spanish Super Cup in August.
Playmaker Xavi, who returned on Wednesday after missing Saturday's 3-0 win at Real Mallorca through injury, said the win in Valencia may prove crucial to Barca's bid for a third consecutive La Liga crown.
"We are coming away with a very good victory," the Spain midfielder told reporters.
"These are points that at the end of the season can bring you a title," the World Cup-winner added.
"We still have our most difficult matches to come. Right now everyone has things at stake. But we are optimistic. We are happy with our form."
Barca, who set a new record of 20 matches undefeated away from home, have 71 points from 26 matches. Real can trim the gap back to seven with a win at home to Malaga later on Thursday.