Barca were confirmed as champions on Saturday when Real Madrid could only draw at Espanyol but initially looked set to mark the occasion with defeat as they trailed to Radamel Falcao's opener when Messi limped off on 67 minutes.
But by the time their talisman had reappeared, changed and showered, on the touchline Barca had snatched an away victory.
Alexis Sanchez equalised on 72 minutes, following a one-two with Cesc Fabregas, before Gabi awkwardly turned a David Villa shot into his own net nine minutes from the end.
The final whistle drew some half-hearted title celebrations from the Barca players in front of the travelling support in Madrid.
Earlier in the day, Valencia gave their Champions League ambitions a major boost by producing a convincing 4-0 win at Rayo Vallecano.
Roberto Soldado scored twice before the break, while Andres Guardado and Nelson Valdez completed the rout in the second half.
The result was Valencia's second consecutive 4-0 victory and means Ernesto Valverde's side temporarily move one point ahead of Real Sociedad, who host Granada on Monday.
Malaga and Sevilla both passed up opportunities to gain ground in their respective campaigns to qualify for Europe by playing out a goalless draw at La Rosaleda.
The two sides were evenly matched and although the visitors created marginally the better chances, a draw was not an unfair result in the end.
The result all put paid to Malaga's already slim hopes of finishing in the top four as they are five points behind Valencia with one game less to play.
Real Betis boosted their European hopes after ending a four-match winless run with a 1-0 victory over relegation-threatened Celta Vigo.
Ruben Castro's goal midway through the second half decided things in Betis' favour as they kept the heat up on stuttering Malaga in sixth spot.
Barcelona were crowned La Liga champions on Saturday night after nearest challengers Real Madrid failed to beat Espanyol at Estadi Cornella-El Prat.
Holders Madrid needed a victory at the home of Barca's city rivals to prevent Tito Vilanova's men from taking their title, but they were held to a 1-1 draw.
Saturday night's result leaves Barca seven points clear at the summit ahead of their trip to Atletico Madrid on Sunday, with Jose Mourinho's side now only having two league games left this season.
This is the fourth time in the last five years that Barca have been crowned Spanish champions and the 22nd time in their history - 10 behind arch rivals Madrid.
It is also the first trophy Barca have won under Vilanova, having lost to Madrid in the Spanish Supercopa at the start of the season and suffered semi-final defeats in the Champions League and Copa del Rey to Bayern Munich and Madrid, respectively.
Vilanova, who this week returned to New York for follow-up tests having spent two months in America earlier this year undergoing radiotherapy and chemotherapy treatment for cancer, was promoted from assistant to head coach following Pep Guardiola's departure last summer.
It was win or bust for Madrid with only a victory sufficient to keep the title race alive for 24 hours at least.
Given Mourinho's side came into the match with nine wins and a draw in their last 10 games, anything other than three points for Real seemed unlikely.
However, they were disjointed and off the pace in the first half which was dominated by Espanyol, who were unfortunate to only have a one-goal lead courtesy of Christian Stuani's 23rd-minute strike.
Hector Moreno incorrectly had a goal disallowed as Real appeared to have one eye on next Friday's Copa del Rey final against Atletico Madrid.
However, the introduction of Cristiano Ronaldo was followed moments later by Gonzalo Higuain's 58th-minute equaliser.
Espanyol were reduced to 10 men in injury-time when Victor Sanchez was given his second yellow card after following through on Higuain but Ronaldo sent the resulting free-kick high and wide.
It was a much-improved second-half performance from Madrid but it was not enough and Barcelona wrested back the title without even playing.
All Saturday's other games had implications at the other end of the table.
Athletic Bilbao took a giant step towards sealing their Primera Division status after overcoming nine-man Real Mallorca 2-1 at San Mames.
Aritz Aduriz gave the hosts an early lead but then missed a penalty after Andreu Fontas was sent off on 25 minutes.
Fernando Llorente doubled the advantage late in the second half but Mallorca forward Giovani Dos Santos made for an exciting finish by netting a superb goal two minutes later.
However, Mallorca's hopes of snatching a late equaliser were struck a blow in injury time when Ximo Navarro was also sent off for a second booking and Athletic were able to hold on.
Alejandro Arribas struck a second-half winner to earn Osasuna a potentially priceless 1-0 victory over Getafe in their fight to avoid the drop.
Arribas netted 16 minutes from time as Osasuna ended a five-match winless streak with a deserved triumph that moves them four points above third-bottom Deportivo La Coruna, who lost 1-0 at Real Valladolid.
Valladolid guaranteed survival for another season thanks to Javi Guerra's goal three minutes into the second half, taking his team onto 43 points, 11 ahead of the Galicians.
In Friday's only game, Levante were reduced to nine men at the Ciudad de Valencia but managed to hold out for a 0-0 draw against Real Zaragoza.
Sunday's La Liga Results
Saturday's La Liga Results
Friday's La Liga Result