After a modest start to the campaign Valverde's position had come under increasing scrutiny, yet goals from Antoine Griezmann and Arthur secured three welcome points on Tuesday.
Villarreal midfielder Santi Cazorla pulled a goal back before the break, but Barcelona's defence stood firm in the second half.
Messi pulled up with a muscle injury just before the half-hour mark and despite returning to the field following treatment was replaced by Ousmane Dembele at the interval.
6 - Lionel Messi has been substituted at the half time for the sixth time for @FCBarcelona in all competitions being last time in 2016 January vs Athletic Club at Camp Nou in #LaLiga (W3 D2 L1). Worry pic.twitter.com/JTto27EBr2— OptaJose (@OptaJose) September 24, 2019
The Argentina forward, finally able to make his 400th LaLiga start following a calf problem, had been instrumental in his team's sixth-minute opener at Camp Nou.
Barcelona added a second goal in the 15th minute with a thunderous strike from Arthur. Villarreal goalkeeper Sergio Asenjo could only stand and watch as the Brazil midfielder, afforded space and time, struck a powerful long-range shot into the top of the net.
The visitors pulled a goal back in equally spectacular fashion just before the break, though, when a slick passing move culminated with a fierce drive from Cazorla which flew beyond Marc-Andre ter Stegen.
Barcelona enjoyed the bulk of possession after the break and had a shout for a penalty when 16-year-old substitute Ansu Fati went to ground, though a VAR check backed up the referee's decision.