The win took Barca back to the top of La Liga on 55 points and gave them a boost before the Champions League last-16, first-leg tie at Napoli on Tuesday and next week’s showdown at Real.
Barcelona captain Lionel Messi was in a prolific mood as his side crushed Eibar 5-0 at home in La Liga on Saturday, scoring four goals to placate supporters who began the game by showing their discontent with president Josep Maria Bartomeu.
The win took Barca back to the top of La Liga on 55 points and gave them a boost before the Champions League last-16, first-leg tie at Napoli on Tuesday and next week's showdown at Real.
Messi had not scored in his previous four games but put the Spanish champions ahead in the 14th minute by dancing and barging his way past three players to slot home for the opener.
He doubled the lead in the 37th with an equally impressive strike before completing his treble moments later and netted his fourth goal late in the second half before Arthur Melo completed Barca's biggest league win of the season with a tap-in.
"Messi has been doing this for 15 years and he's going to keep doing this, he is a guarantee for any team," said Barca coach Quique Setien.
"The reality is that he is always causing trouble for the opponents, and if he's not scoring goals he's setting them up. That's why he is the best in the world, because he solves problems that others can't."
The Argentine's goals cheered fans who began the match waving handkerchiefs and calling for Bartomeu to resign after the club was embroiled in a scandal involving a firm hired to monitor coverage of the team on social media.
Messi indicated he was unhappy with those who run Barca in an interview with newspaper Mundo Deportivo on Friday in which he defended his recent outburst against sporting director Eric Abidal and said the team had faced "problem after problem".
He had also questioned the strength of the Barcelona side, who he claimed were not strong enough at the moment to challenge for the Champions League.
Barca looked shaky in the early stages against Eibar and conceded a goal that was quickly ruled offside but they soon found their feet, led by Messi who was at his unplayable best.
After using a combination of strength and skill to score the first goal, he used his pace to dash past the Eibar defence down the left and lash the ball into the far bottom corner.
Messi then looked to tee up Antoine Griezmann but the French forward lost control of the ball and the Argentine cleaned up by tapping in the third goal.
New signing Martin Braithwaite came off the bench in the second half to make his Barca debut after an unexpected move from league strugglers Leganes and the Denmark striker quickly made an impact by setting up two goals.
He beat a player in the area to find Messi, who toyed with Eibar's desperate defenders and goalkeeper Marko Dmitrovic before walking the ball into the net, then drilled a shot at Dmitrovic which Arthur buried on the rebound.
"Braithwaite did more than I expected, much more," said Setien. "Honestly, I think we've made an extraordinary signing. He will adapt perfectly to what we want to do, he was involved in two goals today and he understands the game so well."