Messi set up Antoine Griezmann with an exquisite dummy before scoring from the penalty spot and then netting his sixth goal of the season, but his first from open play, late on.
Barca had taken an early lead through Ousmane Dembele but squandered a host of chances to double their advantage, including a penalty miss from Griezmann. Betis made them pay when Antonio Sanabria equalised on the stroke of half-time.
Koeman brought Messi on at the break and within minutes he'd helped set up Griezmann and converted a penalty after Aissa Mandi was sent off for handling the ball on the line. Betis briefly got back into the game again through Loren Moron but goals from Messi and Pedri wrapped up the three points for Barca.
Koeman was inundated with questions about Messi's form on Friday, with the suggestion being that the forward is in decline. This performance showed there's nothing to worry about yet. And while it's unlikely Messi will have doubted himself, he will have been relieved to score from open play for the first time this season.
More positives? Dembele's looking sharp, Pedri keeps on delivering and Frenkie de Jong was good. Above all, Barca were fun to watch and created a plenty of chances -- they could have scored 10.
The flip side to that is they missed a lot of chances, too. They could have scored four inside the first 10 minutes and been out of sight by half-time. In the end, they won emphatically, but there's still room to improve.
There's also work to do at the back. Betis' goals were avoidable.
Manager rating out of 10
7 -- Koeman finally took the chance to rest Messi, who had started the club's last 37 league games. The 45 minutes sat on the bench did him the world of good based on his second-half display.
Player ratings (1-10; 10 = best, players introduced after 70 minutes get no rating)
DF Sergi Roberto, 6 -- Both goals originated from his flank and he lost his individual battle with the impressive Alex Moreno. Balanced his performance with two great late assists, one for Messi and another for Pedri.
DF Gerard Pique, 5 -- Could have been better positioned for the Betis goals. Has to play a lot due to Barca's shortage of centre-backs so will benefit from the upcoming international break.
DF Clement Lenglet, 5 -- Like Pique, not his best performance. Lost concentration, perhaps because Barca spent so much of the game further up the pitch.
DF Jordi Alba, 6 -- Effective in attack. His crosses led, either directly or indirectly, to Barca's first penalty and Griezmann's goal.
MF Frenkie de Jong, 7 -- One of his best performances this season. Glided forward with the ball glued to his feet and used it well.
FW Ousmane Dembele, 8 -- Scored a stunning strike with his left foot and won Barca's second penalty when his shot was handled on the line.
FW Antoine Griezmann, 6 -- The France international's performance was good but his finishing was woeful. Missed four good chances, including a penalty, before rolling into an empty net thanks to Messi's genius.
FW Pedri, 7 -- Continues to play more minutes than anyone expected this season and continues to show why. One great flicked pass for Griezmann deserved an assist and he grabbed his second goal for the club late on.
FW Ansu Fati, 6 -- Won the first penalty but missed a couple of chances in the first half before coming off at half-time with a minor injury.
FW Lionel Messi, 9 -- A de facto assist and two goals wasn't a bad return for his 45 minutes on the pitch.
FW Francisco Trinaco, 6 -- Came on for Dembele and did OK.
FW Martin Braithwaite, NR -- A late introduction in place of Griezmann.
MF Miralem Pjanic, NR -- Replaced Busquets far too late to make any sort of mark on the game.