The Argentine ran riot in the opening 40 minutes before Helder Postiga brought the home side back into the game with a quick-fire double just before the break.
The reigning champion was in irresistible form for the first 41 minutes as Barca looked likely to take a 3-0 lead into halftime. The club's talismanic Argentine forward took his goal tally from two to five with a treble, but the home side finished the first period brilliantly.
Helder Postiga produced two moments of excellence just before the break to bring Valencia within touching distance, but the club were not able to capitalize in the second half as both defenses remained solid.
Following the 3-1 defeat at Espanyol in the club's previous fixture, the Valencia side included three changes as Sergio Canales, Andres Guardado and debutant Dorlan Pabon replaced Jonas, Jeremy Mathieu and Sofiane Feghouli.
Barcelona last played on Wednesday as the team drew with Atletico Madrid in the Supercopa de Espana, yet despite this coach Gerardo Martino only felt two changes were necessary for the tip to Mestalla as Pedro Rodriguez and Andres Iniesta came in for Alexis Sanchez and Xavi.
Barca's start was ominous for Valencia as an 11th-minute Cesc Fabregas pass released Messi, who burst through the defense and poked the ball into the net from close range after riding challenges from Diego Alves and Ricardo Costa.
Valencia did improve as an attacking force before halftime as Pabon forced a good stop from Victor Valdes, but Messi completed his hat trick in the final six minutes of the half as he exploited space on the right before firing across Alves and then stroking Pedro’s squared pass in from around the penalty spot.
Barcelona’s dominance was undeniable but Miroslav Djukic’s side gave itself a fighting chance at the end the first half. Postiga first sent Canales’ right-wing cross into the top corner of the goal with a fantastic scissor kick before heading an Ever Banega corner past Valdes from the front post.
After a strong end to the first half, Valencia came out after the restart showing excellent intensity and created the first chance when Postiga played Guardado into the inside left channel, but he hammered his effort over the crossbar.
Barcelona may have been exhibiting some poor defending but in attack the team looked imperious.
As the hour mark approached, Messi had two opportunities to get his fourth goal as Alves first parried away a shot from distance before stopping a tame effort from the edge of the area.
With Valencia’s attacking threat stifled for the time being, Barcelona had another great opportunity as Iniesta’s chipped cross from the left was met by Pedro, but the winger could only head wide.
The final 20 minutes saw the two sides exchange possession on a regular basis as both pressed for more goals, but it was the roaming triumvirate of Neymar, Messi and Pedro that looked the more dangerous, with the Argentine missing two glorious chances just a few meters from goal.