Iniesta, Xavi lead Barcelona past Gijon
Andres Iniesta appeared to put Barcelona in firm control with his goal a minute before halftime as Messi served a one-game suspension for having collected five yellow cards.
But Gerard Pique's red card early in the second half led to Sporting leveling through David Barral's 49th-minute goal.
As nerves began to fray at Camp Nou, Keita struck the winner from the edge of the area in the 79th before Xavi Hernandez capped the victory in the 87th.
''I don't know if I saved the day. The important thing is that we won 3-1,'' Keita said. ''Sure it would have been easier with Messi, he is the best player in the world, but we got the three points.
''We have to be positive and look forward.''
Without his three-time world player of the year, Barcelona coach Pep Guardiola gave the nod to Cesc Fabregas up front along with struggling forward Pedro Rodriguez and youth player Isaac Cuenca, while Chile forward Alexis Sanchez began on the bench.
Sporting coach Javier Clemente, who last won at Camp Nou 30 years ago while at the helm of Athletic Bilbao, deployed a defensive starting 11 without a pure striker.
The former Spain manager's strategy to keep his team behind the ball worked to perfection for most of the first half.
The Catalan side could muster only a goal by Pedro waived off for offside early on and a pair of chances by Adriano and Keita before Iniesta netted the opener.
Iniesta accompanied Adriano's run through the defense, and the speedy left back laid off Keita's nicely placed throughball for the Spain midfielder to tap into the empty net.
But the game took a radical turn moments into the second half when Pique was sent off with a direct red card for fouling Miguel de las Cuevas with just goalkeeper Victor Valdes to beat.
Clemente immediately sent on Barral and the move paid off just four minutes later when the striker beat his marker to the near post to slip Formose Mendy's low cross beyond Valdes for his ninth goal of the season.
Alexis went on with B team standout Christian Tello for Barcelona in the 60th and soon had an opportunity to put Barcelona back in front when Iniesta set him up inside the area, but the Chile forward failed to get off a clean shot.
Despite being at a numerical disadvantage, Barcelona pressed forward until Keita hooked a curling left-footed shot into the far side of the net.
Xavi then secured the result by lifting a chip shot over goalkeeper Juan Colinas off a pass from Iniesta.
Alexis had to leave the pitch with an apparent leg injury before the final whistle.