Former World Player of the Year Ronaldinho curled in a free kick but was unable to prevent the Brazilians from sliding to an astonishing defeat against Raja, who were seen as no-hopers after firing coach Mohamed Fakhir one week before the tournament.
The ever-grinning Atletico playmaker left the pitch amid a crowd of admiring opponents, who qualified as champions of the host nation and are fifth in the Moroccan league.
Raja, a team of average league players with only a sprinkling of international caps between them, will have the chance to add more souvenirs when they face all-conquering Bayern Munich of Germany in Saturday's final in Marrakech.
Mouhssine Iajour gave Raja the lead early in the second half before Ronaldinho curled a free-kick in off the post to level for the South American champions just after the hour.
Mohsine Moutaouali fired home a controversial penalty in the 84th minute and Vivien Mabide wrapped it up in stoppage time with a breakaway goal amid wild celebrations at the Stade de Marrakech.
It was a heart-breaking defeat for Atletico and their army of fans who made the trans-atlantic journey for the competition.
South American teams dream of testing themselves against Europe's top sides and treat the Club World Cup as the biggest prize in football.
"We are all ashamed," Atletico coach Cuca said.
"There are so many fans who stopped at nothing to come here, humble people who saved up for years and we frustrated their dreams.
"This was the most important game of the season for us."
Marrakech was even more chaotic than usual earlier in the day as Raja fans drove around the city, hooting incessantly and sitting halfway out the windows, suggesting that the tournament was anything but a low-key event.
The atmosphere in the Stade Marrakech, which involves a long trek out of the city in appalling traffic, was electric with around 20,000 Raja fans and half that number from Brazil.
Atletico missed two excellent chances to take the lead when Jo somehow missed with a sliding left-foot effort from Lucas's cross and Fernandinho fired wide from an good position.
The Brazilians were already jittery, however, allowing Raja two good chances before the break.
It was no surprise when the Moroccan side went ahead eight minutes into the second half when Iajour was sent clear on the right and fired a low shot past Victor.
Atletico appeared to be losing their way but grabbed an equaliser out of the blue when Ronaldinho curled in his free kick off the post.
That briefly brought them to life and the otherwise subdued Ronaldinho produced one of his party tricks with a flick over an opponent, but it did not last.
Raja broke away after Atletico wasted a corner and Rever was adjudged to have tripped Iajour, although replays suggested no contact was made. Moutaouali set the stadium wild by converting the penalty.
The desperate Brazilians charged upfield and were caught completely open, allowing Mabide to produce the coup de grace in the fourth minute of stoppage time.