The action-packed, all-Spanish match was won when Pedro, linked by British media with a move to Manchester United, scored from close range after a shot by Messi rebounded in the 115th minute on Tuesday.
In the final seconds of extra time, Sevilla defender Adil Rami had a golden chance to send the match to penalties but missed an open goal from close range.
Earlier, Sevilla had battled back from 4-1 down to 4-4 as Barcelona's fitness was tested in its first competitive match of the season - Europe's curtain-raiser between the winners of the Champions League and the second-tier Europa League.
"I thought we were much better, much stronger," Messi said of the first hour of the match. "We had the ball for the first 60 minutes, we had opportunities, we scored. And then we seemed to have relaxed, we let them have the ball, we withdrew a bit.
More From This Section
"It got pretty tough when we looked like we were winning hands down, but fortunately we didn't have to go to penalties."
Calling the match "spectacular" for Barcelona's supporters, coach Luis Enrique suggested his team had taken too many risks while leading.
Luis Enrique refused to discuss whether Pedro's winning goal could make it more likely for him to stay with the club. His Sevilla counterpart Unai Emery said he was "very proud" of his team, which has been rebuilt over the summer after its Europa League win.
"If there's one thing we want to make this team, it's competitive. We want this team to really go for victory whatever the circumstances," he said. "We stood up to the best team in the world.