Neymar's opening goal was cancelled out by Cedric Bakambu in the first half, but Lionel Messi helped himself to a brace either side of a Luis Suarez strike to keep the pressure on Real Madrid in the title race.
The match pitted the league's best home attack against the best away defence and it initially looked as though the latter would come out on top as a lacklustre Barcelona struggled to break down a resilient Villarreal side in the opening exchanges.
In the end it took a stroke of luck for the hosts to break the deadlock after 21 minutes when Suarez picked out Messi, whose shot deflected kindly into the path of Neymar to poke home from close range.
Messi was able to get a shot of his own away shortly before the half-hour mark when he collected Ivan Rakitic's pass and got the ball out of his feet only to drag his effort wide of the far post.
Barcelona had looked shaky at the back on a couple of occasions and they were eventually punished for their high line when Bakambu raced through on goal before keeping his composure to slot the ball past Marc-Andre ter Stegen at his near post.
The hosts had a glorious chance to regain their lead with just six minutes remaining until half time when Messi created space to stand the ball up at the back post for Gerard Pique, but the defender was at full stretch and could not steer his header on target with the goal gaping.
Villarreal responded with a clear opening of their own when Roberto Soriano's cross found Roberto Soldado completely unmarked in the penalty area, but the former Tottenham Hotspur man sent his glancing header wide.
Barca were soon back on the attack, though, and Neymar was the next to come close when he dragged a shot past the far post after finding space down the left channel.
Enrique's side did go into the break with the lead, though, as Messi notched his 50th goal of the season with the final kick of the half when he danced into shooting position before firing a deflected effort into the bottom corner.
That goal was also the 100th scored by the MSN attacking trio this season, but they were not done there and Messi almost added another shortly before the hour mark when his powerful right-footed volley was turned over the crossbar by Andres Fernandez.
Suarez completed the set of that trio by joining Neymar and Messi on the scoresheet with just over 20 minutes remaining, hammering a low strike past Fernandez after beating his marker inside the penalty area.
Neymar could have put the game to bed once and for all shortly afterwards when he was on the end of an incisive counter-attack, but he got his finish all wrong and chipped a tame effort straight at the keeper.
The visitors almost pulled a goal back moments later when another defensive mix-up presented Bakambu with a chance, but Pique was eventually able to scramble the ball to safety.
Any hopes of a late comeback were ended nine minutes from time when Barcelona were awarded a penalty, although replays showed that the officials were wrong to award a handball after Neymar had brilliantly set up Suarez for a shot at goal.
Barca were in no mood to let their visitors off, though, and Messi doubled his personal tally for the night in impudent fashion with a Panenka-style penalty down the middle.
Andres Iniesta and Suarez both had long-range efforts as Barca went in search of a fifth goal, but the hosts were forced to settle for four as they moved three points clear of Madrid ahead of Los Blancos' trip to Granada later this evening.
Villarreal, meanwhile, remain six points adrift of the Champions League places with only two games of the season remaining, while Athletic Bilbao and Real Sociedad are just a point behind the Yellow Submarine.