Athletic made a dream start under new coach Marcelino when Inaki Williams opened the scoring in the third minute. Their lead didn't last long, though, with Pedri heading in Frenkie de Jong's acrobatic pull-back in the 14th minute.
Barca moved ahead when Pedri and Messi combined for the latter to score before the break and Messi added his 12th goal of the season in the second half. Iker Muniain scored a late consolation for Athletic but Ronald Koeman's side held on to make it seven games unbeaten in the league.
Barca finally seem to have an idea of the direction they're heading, with the players starting to look more aware of their roles. De Jong is taking responsibility and getting forward more and Ousmane Dembele's presence allows them to mix up the way they play, too. With the Frenchman on the pitch, they are able to inject pace and unpredictability into a game.
However, the most exciting thing about Barca at the moment is the relationship between Messi and Pedri. It's been clear for a few weeks now that they're on a similar wavelength and they combined to good effect again at San Mames. Pedri's back-heel to set up Messi's first goal was a sparkling moment.
Barca started slowly and looked exposed defensively when Athletic attacked. That led to the Williams goal and another counter ended with the home side hitting the side netting before Pedri's leveller.
Manager rating out of 10
7 -- Koeman looked to have erred dramatically sticking with a back four when Athletic tore his side open in the first five minutes. But Barca took control and it feels as though the Dutch coach is slowly working out what his best side is.
Player ratings (1-10; 10 = best. Players introduced after 70 minutes get no rating)
GK Marc-Andre ter Stegen, 6 -- Unsighted on the Williams goal and could do little about Muniain's late, brilliant first-time finish.
DF Sergino Dest, 6 -- Got forward whenever possible, missing one good chance, and benefitted from the help of Dembele, who moved back to the right-wing.
DF Clement Lenglet, 6 -- Was beaten too easily by Williams for the first goal but appeared to learn his lesson as he improved from there.
DF Jordi Alba, 6 -- Not as involved in attack as in previous games but still got forward to help Barca build a numerical advantage.
MF Sergio Busquets, 6 -- A tough job at the base of the midfield in an attacking side but did well.
MF Frenkie de Jong, 8 -- Has come on leaps and bounds in recent weeks and is producing the goods in the final third. Did brilliantly to set up Barca's equaliser to make it two assists and two goals in his last six league games.
MF Pedri, 9 -- Scored one and made another in another good display. You have to pinch yourself when you remember he's only just turned 18.
FW Ousmane Dembele, 7 -- Looked in his element in the first half as he toyed with Athletic's defenders. Brought two saves out of Unai Simon but it was his speed from a standing start that really caught the attention.
FW Lionel Messi, 9 -- At times, his finishing has been less than his usual exceptional best this season but he was firing against Athletic. Took his goals well, had a third ruled out for offside, and hit the woodwork twice. Also played a great pass in the build-up to Pedri's goal. Will have been disappointed to give the ball away loosely ahead of Athletic's second.
FW Antoine Griezmann, 6 -- Worked hard but didn't have as many chances as he would like. Set up some good ones, though, including one for Dest and Messi's second goal.
FW Martin Braithwaite, N/R -- Left on the bench in La Liga for the first time since November, he came on for Dembele in the latter stages of the game.
DF Oscar Mingueza, N/R -- In what is becoming a habitual change, he replaced Dest for the final 15 minutes.