Fernandinho, a substitute in the 70th minute, broke the stalemate by heading home a corner from Daniel Alves three minutesfrom the time, but was sent off by Italian referee Roberto Rosettitwo minutes into extra time.
The Spaniards virtually played the whole game with a man down after Real Betis midfielder Juan Alberto Andreu 'Melli' was sent off in the fifth minute.
With the victory, Brazil, who also won in 1983, 1985 and 1993, tied Argentina with four titles apiece in the tournament.
Argentina, who lost the semifinal to Brazil 1-0, was beaten again 2-1 in the third-place play-off by Colombia.
Erwin Carrillo and Jaime Castrillon scored their goals in either half while Osmar Ferreyra only managed to level for Argentina on the stroke of half time.
It is the best result ever for the Colombians but the worst moment for Argentina who have never before reached the world youthsemi-final without booking a spot in the final.