Keita, Xavi rescue 10-man Barca against Sporting
Mali international Keita popped up to curl in a left-footed shot from the edge of the area with 12 minutes remaining, before Xavi finished Sporting with two minutes left.
Earlier Andres Iniesta had opened the scoring for Barca before David Barral took advantage of a Gerard Pique red card to bring the Asturian side back into the game.
Barcelona were without Lionel Messi who was serving his first ever suspension for a fifth yellow card.
Real Madrid can restore their imposing 10-point advantage at La Liga summit when they face Espanyol on Sunday.
Despite the win, Barcelona coach Pep Guardiola admitted that his hopes of clinging onto the title were fading.
"I honestly feel we have very little chance of catching Madrid, the gap is too much, but we've won 13 out of a possible 16 competitions and we'll continue to fight," he said.
"It is not the fault of referees that we are not first, the main reason is we have failed."
Up against a Sporting Gijon side desperate to claw their way out of trouble in the relegation zone, and with ex-Spain manager Javier Clemente unbeaten in two games since taking over, Barca were never comfortable all evening.
In Messi's absence it was Iniesta and Xavi who pulled the strings and Barca dominated possession in the first period, but a well-organised Sporting managed to keep the Catalans out until the 41st minute.
Brazilian full-back Adriano Correia made a searching run deep into the Sporting half and exchanged passes with Keita allowing him to reach the byline and pull back a pass for the waiting Iniesta and the easiest of chances to open the scoring.
However things went wrong for Barca within a minute of the restart when Pique saw red when he and Miguel De Las Cuevas wrestled for the ball on the edge of the area.
The free-kick for the foul was wasted by Barral who had been immediately brought on to give Sporting more attacking options.
However a minute later the same player reacted first to a cross after good work from Formose Mendy, playing his first full game for Sporting, to level the game.
On 60 minutes Alexis Sanchez wasted a good chance after Iniesta had played the Chilean through with a beautifully crafted pass and by this stage Barca's goal opportunities were scarce.
Sanchez had just entered the fray as Barcelona coach Pep Guardiola looked to change a formation that had started with Cesc Fabregas as his most advanced player in a quest to find the winning combination.
The task, made more difficult by Pique's sending off, looked to be heading for failure until Keita's strike.
In other games on Saturday there were wins for Malaga and Rayo Vallecano that improved their chances of European competition next season while rivals Sevilla and Atletico Madrid drew 1-1 in a tight, competitive game.
Argentinian midfielder Eduardo Salvio opened the scoring early on for Atletico Madrid in Sevilla with a glancing header from a Gabi Fernandez cross.
It was an African combination that levelled the game when Malian Freddie Kanoute provided the cross for Senegalese striker Baba Diawara's first goal for Sevilla.
Both teams remain level in ninth and 10th on 33 points and four behind fourth placed Malaga who came from behind to win 3-1 at Getafe for who Diego Castro scored on 42 minutes.
The visitors equaliser came quickly with a spectacular shot from the Brazilian Eliseu before Jeremy Toulalan and Santi Cazorla earned the three points with equally superb strikes in the last 10 minutes.
Rayo Vallecano are eighth, 3 points behind Malaga after they came from two goals down to beat Racing Santander -- who had goalkeeper Tono sent off on three minutes -- 4-2.
Santander raced into the lead with goals from Marc Torrejon and Gonzalo Colsa, but Rayo shuffled their pack and came back with some great attacking play and two goals from Michu and one each from Raul Tamudo and Piti.
Santander remain in the relegation zone, three points from safety.
Osasuna drew 1-1 at Mallorca to move sixth on 35 points. Emilio Nsue grabbed a second-half leveller for them after Alvaro Cejudo had put the visitors ahead on 45 minutes.
Related Barcelona News