Messi stretched Barca's lead by finishing off a brilliant move with Luis Suarez in the 50th minute and the Uruguayan joined his close friend and strike partner on 15 league goals by robbing an Eibar defender and finishing inside the near post in the 68th.
Midfielder Dani Ceballos added: "It looks like us changing our coach worked. We have recovered some sensations we had lost and we have got the three points. Now our objective is to win all the games left and finish the season as well as possible."
News of all that's transpired on and off the football field
Holders Barcelona produced a second-half blitz to come from behind and beat Athletic Bilbao 3-1 to book a place in the King's Cup semi-finals after Atletico Madrid crashed out in a shock 3-2 defeat by Celta Vigo.
Atletico Madrid maintained a two-point lead in La Liga with a 3-0 victory at Las Palmas and Barcelona and Real Madrid stayed hard on their heels with thumping wins over Athletic Bilbao and Sporting Gijon on Sunday.
The result also means second-placed Real Sociedad can reclaim top spot if they beat Eibar on Sunday.
Lionel Messi will have another chance to match or surpass Telmo Zarra's six-decade-old La Liga scoring record of 251 goals when Barcelona host promoted Eibar on Saturday.
IMAGES from the La Liga matches played on Tuesday
Atletico Madrid striker Diego Costa haunted Arsenal again by firing his side to a 1-0 win in Thursday's Europa League semi-final second leg to send the Spaniards into the final and deny Arsene Wenger a dream end to his long reign as Arsenal coach.
Real Madrid can bury Atletico's hopes of winning La Liga with a third straight victory against their city neighbours on Sunday that would leave the capital's second club trailing by six points.
Atletico Madrid's La Liga title challenge took a nosedive when they slumped to a shock 3-0 defeat at Osasuna on Sunday, leaving Real Madrid three points clear at the top.
News of all that's transpired on and off the football field
Lionel Messi overhauled Real Madrid great Alfredo Di Stefano's La Liga goals tally as Barcelona and Atletico Madrid each won on Saturday to pull three points clear of Real at the top.
A round of Saturday's matches in Series A, La Liga and Bundesliga.
Atletico Madrid's Brazilian striker Diego Costa scored twice as they came from behind to beat Levante 3-2 at home on Saturday to go three points clear at the top of La Liga.
Atletico Madrid tore apart city rivals Real Madrid 4-0 at home to open up the La Liga title race on Saturday in a triumph crowned by a spectacular overhead kick goal by Saul Niguez.
Lionel Messi has been included in Barcelona's squad for Wednesday's Spanish Super Cup second leg at home to Atletico Madrid after recovering from a thigh problem sustained in last week's 1-1 first-leg draw at the Calderon.
News of all that's transpired on and off the football field
Real Madrid ended their long wait for a La Liga victory by beating Real Valladolid 2-0 on Saturday with two late goals in interim coach Santiago Solari's first home game in charge of the struggling European champions.
News of all that transpired on and off the field.
Cristiano Ronaldo struck twice as leaders Real Madrid subdued Eibar 4-0 on Saturday while Lionel Messi set a La Liga record of 253 goals with a hat-trick in second-placed Barcelona's 5-1 rout of Sevilla.
IMAGES from the UEFA Champions League matches played on Tuesday
Real Madrid's unbeaten start to the La Liga season came to an abrupt and surprising end as Real Mallorca claimed a stunning 1-0 victory at a rocking Son Moix on Saturday to climb out of the relegation zone.
Atletico Madrid secured a berth in the Champions League group stage for next season and Deportivo La Coruna narrowly escaped relegation when they came from two goals down to draw 2-2 at champions Barcelona on the final day in La Liga on Saturday.
Griezmann special earns Atletico 1-1 draw at Sevilla
A round-up of Sunday's matches in La Liga, Serie A and Bundesliga.
Neymar scored the opener to continue his rich vein of form as 10-man Barcelona won a one-sided La Liga derby against Espanyol.
Luis Suarez struck twice and Lionel Messi scored on his 500th appearance for Barcelona who set a new Spanish record of goals in a calendar year with a 4-0 win over Real Betis that lifted them top of La Liga on Wednesday.
Atletico Madrid demonstrated their remarkable team spirit to come roaring back from two goals and a man down to draw 2-2 at Liga debutants Girona on Saturday, after Antoine Griezmann had been sent off for the first time in his career.
News of all that's transpired on and off the football fieLd
Manchester City boss Pep Guardiola has warned his side to beware of Monaco's "killers in the box" when they host the principality club in the first leg of their Champions League, last 16 tie on Tuesday.
Having absorbed the body blow of losing striker Radamel Falcao in the close season, Atletico Madrid have emerged as genuine contenders to break the title stranglehold of Real Madrid and Barcelona.
News of all that's transpired on and off the football field
Luis Suarez was incredulous after being sent off in Barcelona's thrilling King's Cup semi-final second leg with Atletico Madrid on Tuesday, ruling him out of the final in May after playing a pivotal role in getting his team there.
Atletico Madrid delayed Barcelona's La Liga title celebrations by beating Valencia 3-2 at home in an entertaining game on Wednesday at a sparsely attended Wanda Metropolitano stadium.
News of all that's transpired on and off the football field
Juve forward Cristiano Ronaldo had an unusually quiet game after scoring a hat-trick against Atletico in last year's competition, although he came within inches of grabbing a last-gasp winner when he sent a shot just past the far post.
Atletico Madrid took advantage of Barcelona's slip-up to go top of La Liga with a 4-0 victory over Real Sociedad as Real Madrid drew 1-1 at Athletic Bilbao and Cristiano Ronaldo was sent off on Sunday.
Lionel Messi marked his 300th La Liga appearance with a record-equalling hat-trick and an assist for Neymar as Barcelona stayed hard on the heels of leaders Real Madrid with a 5-0 romp at home to Levante on Sunday.
Portugal forward Cristiano Ronaldo won the FIFA Ballon d'Or award for the second year running and the third overall on Monday after a prolific, trophy-filled year with Real Madrid.