Fellow substitute Francisco Trincao grabbed an 87th-minute winner to send Barca back up to second following an entertaining five-goal thriller in Seville.
It was far from vintage from the visitors and twice they looked on course to drop points, but they hit back and trail leaders Atletico Madrid by seven points while confidence is growing ahead of this month's Champions League tie with Paris St Germain.
Koeman had bemoaned the hectic fixture list ahead of Sunday's clash and made the decision to leave six-time Ballon d'Or winner Messi on the bench.
The Dutchman's frustration would have increased after only 11 minutes when centre-back Ronald Araujo had to be withdrawn due to an ankle injury.
Barca struggled for fluency in the first half and failed to register a single shot or commit any fouls. It was therefore no surprise Betis were one up at the break after Borja Iglesias finished off a slick counter-attack in the 38th minute.
Approaching the hour mark and ex-Everton boss Koeman had seen enough and introduced Messi and Trincao – his third and fourth substitutions of the night.
With Frenkie De Jong and Pedri already brought on, the arrival of Barca's captain had an instant impact when Ousmane Dembele found the Argentina playmaker on the edge of the area and he drilled the ball into the bottom corner.
Messi was also central to the away side going in front when he found Jordi Alba and his cross was diverted into his own net by Victor Ruiz.
Former West Ham manager Manuel Pellegrini would have been thrilled when Ruiz atoned for his error with a headed equaliser 16 minutes from time, but the scoring was not over.
Barca, who had only lost once in 15 games before this fixture, were not to be denied all three points and Trincao picked an opportune time to get off the mark for the club he joined in the summer.
The 57th-minute substitute controlled a loose ball on the edge of the area after Messi's chip forward was only half-cleared by Ruiz, and curled into the corner to spark wild celebrations.
After a difficult time since a big-money move from Braga in July, the 21-year-old helped Barca keep up the pressure on leaders Atletico, who are in action on Monday at home to Celta Vigo and could move 10 points clear at the top.
Next up for Barcelona is another trip to Andalusia on Wednesday to play Sevilla in the Copa Del Rey, where Koeman could rotate again with an eye on the Champions League round-of-16 first-leg against PSG on February 16.