While Barcelona were able to hold on during the second half, they were dealt a blow as Lionel Messi - making his first start of the season - was substituted midway through the contest after picking up what appeared to be a thigh problem.
Ernesto Valverde's side now sit in fourth place in the standings, while Villarreal are in eighth position after missing the chance to move level with joint leaders Granada, Athletic Bilbao and Real Madrid.
Having successfully come through substitute outings against Borussia Dortmund and Granada over the past week, Messi was deemed fit enough to feature from kickoff after a calf problem, and it did not take long for the forward to have an impact.
Messi's inswinging corner was directed towards the near post for Griezmann, who got ahead of his marker to glance a header into the far corner via the underside of the crossbar.
The Catalan giants looked a different side to the one which had failed to score in their previous two fixtures, and they soon doubled their advantage when Arthur's 25-yard strike took a slight deflection on its way into the top corner.
Barcelona were rampant with Messi going agonisingly close to making it three, but there was concern on the half-hour mark when the Argentine required several minutes of treatment for an issue with his thigh.
While the playmaker was able to continue, Villarreal grew into the contest as half time drew closer, before Cazorla halved the deficit with a minute remaining by finding the roof of the net with a stunning effort from long range.
The home side were dealt a further blow when Messi was withdrawn at half time, potentially as a precaution, and it enabled Ousmane Dembele to make his own return after being sidelined for a month.
Villarreal soon picked up where they had left off in the first half as Cazorla forced Marc-Andre ter Stegen into a fine save from 10 yards out after the Barcelona defence had been carved open from the flank.
While the hosts were able to hit back through Luis Suarez, who failed to beat Sergio Asenjo from inside the area, Ernesto Valverde would have been disappointed that his players were struggling to keep their opponents under pressure.
Moments after coming on as a substitute, Villarreal forward Moi Gomez's low drive tested Ter Stegen, with the goalkeeper needing to get down to his right to make the save.
Barcelona thought that they had a good shout for a penalty with nine minutes remaining when Ansu Fati went down inside the area, although VAR quickly confirmed that the teenager had gone to ground too easily.
Gerard Pique saw a free kick saved by Asenjo in added-on time, while Griezmann sent an acrobatic volley over the crossbar after turning on the edge of the box.
However, despite the near misses, Barcelona were able to hold on for three much-needed points as they got themselves back into contention at the top of the table.
BARCELONA (4-3-3) Ter Stegen; Semedo, Pique, Lenglet, Firpo; Sergi Roberto (De Jong 63'), Busquets, Arthur; Messi (Dembele 46'), Suarez (Fati 78'), Griezmann
VILLARREAL (4-2-3-1) Asenjo; Pena, Albiol, Torres, Quintilla; Zambo Anguissa, Iborra; Chukwueze, Cazorla (Bacca 77'), Ontiveros (Ekambi 57'); Moreno (Gomez 68')body check tags ::