Affonso struck in the 92nd minute at Rampla Juniors as Racing came from behind to seal a 2-1 Apertura win in Montevideo.
The win kept Racing one point ahead of Nacional, who had veteran Alvaro Recoba score from a corner in their 2-0 home success against an out-of-form Wanderers.
Rampla Juniors took the lead in unusual circumstances as Bruno Barreto - a third-minute substitute for Maximiliano Arias - netted the opener.
Barreto's 12th-minute strike was cancelled out by Juan Pablo Rodriguez just before the half-hour mark but it looked like both sides would have to settle for a point.
And that would have represented a great result for a Rampla side who have recently found form and moved away from the bottom of the league.
But Affonso - introduced with 15 minutes to play - ensured Mauricio Larriera's side would take all three points on their travels.
Racing are unbeaten this season, having won six of their seven matches.
Nacional remain hot on Racing's heels after their fourth triumph in a row - a win highlighted by Recoba's stunning 44th-minute opener.
The 38-year-old star - who was at Inter from 1997 to 2008 - curled in directly from a corner, with his set-piece sailing over Wanderers goalkeeper Federico Cristoforo and in via the far post.
Recoba also scored from a corner for Nacional in 2012.
Carlos de Pena got Nacional's second in their win on Saturday as they kept a clean sheet for the third match in a row.
Penarol sit third - four points off the pace - but remain unbeaten after a 3-1 success against River Plate.
Both sides finished with 10 men but Jonathan Rodriguez's double and a Sergio Orteman penalty helped Penarol end a run of three successive draws.
At the other end of the table, rock-bottom Cerro are still without a win after a goalless draw against El Tanque Sisley.
Defensor Sporting made it three wins on the trot with a 4-1 triumph at Tacuarembo - Matias Alonso scoring twice.
Elsewhere, lowly Atenas won 3-0 at Rentistas and Sud America beat Juventud 3-1, while Fenix and Danubio played out a 0-0 stalemate.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.