(CNN) -- Substitute Lionel Messi scored in the second half as Barcelona came from a goal down to beat Mexican club Atlante 3-1 to reach the final of the Club World Cup in Abu Dhabi on Wednesday.
Atlante took a shock lead over the European champions with a fifth minute goal by Guillermo Rojas, but Sergio Busquets equalized in the 35th for the tournament favorites.
Messi showed he has recovered from an ankle injury he picked up at the weekend by scoring in the 54th minute soon after coming off the bench.
The Argentine ace picked up a pass from striker Zlatan Ibrahimovic before rounding goalkeeper Federico Vilar to put Barcelona 2-1 ahead.
Pedro Rodriguez sealed the victory in the 67th minute, keeping up his record of scoring in different competitions for Barcelona.
Barcelona will now face South American champion Estudiantes of Argentina in Saturday's final as it goes for an unprecedented sixth trophy in 2009.
Barcelona have already won the Champions League, Spanish league, Spanish Cup, Spanish Supercup and European Supercup trophies in 2009, with Pedro scoring in each of these competitions.
Rojas took advantage of defensive indecision to give Atlante their early advantage, scoring from an acute angle past goalkeeper Victor Valdes.
Ibrahimovic threatened to draw Barca level but Busquets made the breakthough as he volleyed home Yaya Toure's headed assist.
Messi's arrival was greeted with acclaim by the capacity 40,000 crowd at the Zayed Sports City Stadium and he made an immediate impression with a trademark goal.
Excellent work by midfielder Andres Iniesta set up Pedro for the clinching goal with Barca surviving some late Atlante pressure to go through.
Barcelona coach Pep Guardiola said their Mexican opponents had made them work hard for victory.
"I'm very pleased we won but it was very difficult," he told www.fifa.com.
"As I said beforehand, Atlante are a quality side. They pass the ball well and have a lot of speed, especially with Rojas. But I think we were the better team and the result reflected that."
Atlante will now play Asian champions Pohang Steelers in the third-place playoff on Saturday.
The annual tournament, organized by world governing body FIFA, brings together the champions of respective club tournaments on each continent, and is being staged this year in the United Arab Emirates.