Betis's livewire winger Junior gave the visitors a deserved lead in the 20th minute, finishing off a hugely impressive counter-attack that had started in their own penalty area, while captain Joaquin doubled their lead in the 35th after another venture down the wing from Junior.
Lo Celso blasted a shot towards goal and it seemed routine enough for Ter Stegen but the ball squirmed through his grasp and into the back of the net to deepen Barcelona's misery.
Ivan Rakitic was sent off, however, with nine minutes left and Sergio Canales added a fourth for Betis before Messi poked home at the end of an enthralling encounter.
They are now just one point clear at the top of La Liga on 24 points after 12 games, one point clear of Atletico Madrid and Alaves.
- Barcelona have lost a LaLiga home game for the first time since September 2016 against Alaves (1-2), 792 days ago.
Bryant practices with Saints, asserts he's 'not a bad guy.'
The Saints could activate undrafted rookie receiver Keith Kirkwood from their practice squad for added depth Sunday. Coach Sean Payton did not acknowledge the injury when asked about Bryant after practice, before the news broke.
FC Barcelona's Lionel Messi (right) reacts after Real Betis scored at the Camp Nou.
"We want the best from every player in our team, Dembele has incredible talent and we want to help him to show it some day".
Atletico Madrid, whom they face at the Wanda Metropolitano after the worldwide break, Sevilla and Alaves lead the chasing pack.
"We understand that any player theoretically can play the game, but of course there is always a period where you need to be careful", he said.
Junior's low cross was met at the back post by Cristian Tello, who picked out Joaquin to slide past Ter Stegen from 10 yards for his second league goal of the campaign.
The France international's absence from training was reportedly due to his phone running out of battery, meaning it took an hour-and-a-half for him to notify the club of a stomach bug. Ter Stegen made the error, letting Lo Celso's shot slip through his fingers and into the far corner. Two substitutes combined for a second, Munir El Haddadi laying on Vidal to make it 3-2 but no sooner had the recovery began again, it was halted. The video assistant referee deemed Messi onside but there was no more late drama as Betis held on for a shock victory.