Argentina forward Sergio Aguero scored twice to help the Olympic champions to a 3-0 win over Brazil in their semi-final on Tuesday.
Aguero also won a penalty from which Juan Roman Riquelme completed the scoring to earn Argentina a place in Saturday's final against Nigeria, 4-1 winners over Belgium.
The Olympic Games are the only major title to have eluded the Brazilians, five-times winners of the World Cup and eight-times winners of the Copa America.
After hitting the post twice, their frustration boiled over in the last 10 minutes when Lucas and Thiago Neves were sent off, both for tackles on Javier Mascherano.
Such was the importance Brazil attached to the contest that Dunga, coach of the senior side, took charge of the team in Beijing.
Although it was not quite the real thing, with Olympic soccer restricted to under-23 teams (plus three over-age players per team), the duel between Brazil's Ronaldinho and Argentina's Lionel Messi still made the South American derby one of the highlights of the Olympics.
A 62,000-strong crowd packed the Workers Stadium to see the former Barcelona team mates, almost certainly the first time in an Olympic soccer tournament that two such big names have been on the same pitch.
On a personal level, Messi easily won the duel. Ronaldinho, included as one of Brazil's three permitted over-age players in the tournament, was barely in the contest.
Argentina, who had not beaten Brazil in their last four senior meetings, enjoyed slightly the better of a first half which saw only flashes of inspiration.
Argentina broke the deadlock in the 52nd minute when a typically intricate exchange of passes down the left ended with Angel Di Maria firing a shot across goal which bounced off Aguero and into the net.
Rafael Sobis hit the bottom of the left-hand post with a 25 meter drive as Brazil looked for a quick reply.
Argentina then increased their lead when Messi dribbled his way across the penalty area and found Ezequiel Garay, whose low cross was turned in by the ever-alert Aguero.
Brazil continued to find themselves out of luck when Ronaldinho struck the post from a free kick and Alexandre Pato turned the rebound into the net, only to have the goal disallowed for offside.
Riquelme added a 76th minute penalty to kill off their hopes.