Messi, who had been rested for the 4-0 win against Dynamo Kiev in the Champions League on Tuesday, scored the fourth goal and celebrated by revealing a Newell's Old Boys shirt in Maradona's honour, after he died at the age of 60 on Wednesday.
- Marcotti: Maradona soccer's ultimate flawed genius
- Funeral workers fired over Maradona coffin photos
- Diego Maradona: Soccer great's life in pictures
- Maradona front pages: 'In the hands of God'
Messi began his youth career at Newell's before joining Barcelona and Maradona was on the books at the Rosario-based club at around the same time, toward the end of his playing career.
The Catalans had paid homage before kickoff to Maradona, who played for the club in an eventful yet disappointing spell from 1982 to 1984, hanging a framed signed shirt of his above the presidential box while the players held a minute's silence in front of an old Barca shirt bearing the No. 10.
After scoring twice against Kiev in midweek, Braithwaite opened the scoring for Barca on his first La Liga start of the season with a scruffy strike in the 29th minute, bundling the ball over the line in a goalmouth scramble.
Griezmann doubled the hosts' advantage on 42 minutes with a stunning volley from just inside the penalty area following Jon Moncayola's headed clearance.
And Coutinho, who had a shot cleared off the line early on, scored from close range in the 52nd minute following good combination play from Braithwaite and Griezmann.
Substitute Ousmane Dembele saw a goal chalked off for offside in the 69th minute as Barcelona found their stride, but minutes later Messi added the fourth for real with a shot from the edge of the box.
"Maradona deserved an emotional tribute like that, we have lost a global idol," Coutinho said. "Everyone in football admired him and we'll all miss him."
Griezmann added: "We didn't know what Messi had prepared in tribute to Maradona, it was a beautiful surprise.
"It was very important to win today because the teams at the top keep winning and we can't afford to slip up any more. We know it will be difficult but we showed today we want to win the league and have a team capable of doing that."
Barca defender Clement Lenglet limped off in the 67th minute with an ankle problem, leaving his side with no fit first-team centre backs due to injuries to Samuel Umtiti, Ronald Araujo and Gerard Pique.
"I have spoken with the doctor and it seems we will have to wait until tomorrow, but it's not that serious," Barca coach Ronald Koeman said postmatch. "I don't know about Wednesday's game ... I hope it's nothing major."
"[It was an] important win because we needed it," Koeman said. "We now have six games before the end of the year and we want to win them all because we want to win the title. We had chances today and we took them. I am really happy."
Information from Reuters was used in this report.