Messi, playing his 200th game for the club, took his league goals tally to 27 for the season and 42 in all competitions although third-placed Valencia had stunned the Spanish and European champions by taking a shock early lead.
“The most important thing was that the team played like we did against Bayer Leverkuson in the Champions League in midweek when we won 3-1,” said Messi after his Camp Nou masterclass.
“There are lots of crucial challenges ahead and it’s necessary to keep going like this.”
Barca coach Pep Guardiola saluted his team and insisted that they do not deserve to be so far off the pace in the title chase.
“With the football we have played we don’t deserve to be so far behind but our challenge now is to keep the title race open and that is down to us,” he said.
“We need to compete for the next three months just like we have done in this match.
“We are lucky to have such a generation of players. It’s a privilege to work with such fantastic lads. They are a credit to the sport.”
The pressure was on the Catalan side after defeat last weekend away to Osasuna and they got off to a poor start with Pablo Piatti giving Valencia the lead after nine minutes.
Martin Montoya, in the side with Dani Alves suspended, and Gerard Pique left Piatti unmarked and keeper Victor Valdes came and failed to reach a Sofiane Feghouli cross allowing the diminutive striker to tuck the ball in.
The home fans were becoming restless but Messi responded once again when his side needed him most with two goals in five minutes.
Adil Rami failed to clear a cross and Messi coolly finished from a tight angle.
The Argentine then got ahead of the Valencia defence to meet an Eric Abidal cross and while the keeper Diego Alves saved his initial shot, he was able to sweep in the rebound.
Alexis Sanchez and Cesc Fabregas were both denied by Alves while the former Arsenal player then hit the woodwork with an acrobatic effort.
The home side continued to push forward after the break with Alves stopping a Messi header with a wonderful save and Fabregas badly miscued before Messi gave Barca a cushion by firing in a rebound after another Alves block.
Messi completed his hat-trick with 15 minutes to go and then notched up his 42nd goal of the season after running clear of the defence and clipping the ball over the keeper.
With the Valencia defence in disarray substitute Xavi Hernandez lobbed the ball over the keeper for the fifth in injury time.
Despite the rout, Barca are still struggling to retain their title after Real Madrid had swept past Racing Santander 4-0 on Saturday.
Levante’s miserable form continued when they dropped out of the European places, losing 5-3 at home to Rayo Vallecano.
The modest side from Valencia have spent most of the season among the top four after a surprising start which also saw them briefly lead the table, but they now haven’t won in two months and have tumbled down to seventh place.
Lass Bangoura put the visitors ahead but Jose Barkero brought Levante level at the start of the second half with a penalty after substitute Abdelkader Ghezzal was felled by Jorge Pulido.
Levante were in the ascendancy but against the run of play Diego Costa hit a quickfire double and then Lass gave them a commanding lead after 69 minutes.
Rubin Suarez pulled a goal back and then Andrija Delibasic added a fifth for Rayo.
There was still time for Suarez to score again for Levante with a spot kick and Pulido was sent off for a second yellow card after giving away the second penalty.
Atletico Madrid squandered the chance to move up to fourth as they were held to a 1-1 draw by relegation-threatened Sporting Gijon under new coach Javier Clemente.