This is the first time Germany have beaten Brazil for 18 years and only the fourth time the hosts have beaten the South American giants in 21 meetings.
After a goalless first 45 minutes, a second-half penalty by Bayern Munich's Bastian Schweinsteiger and a superb individual effort from Götze put the hosts ahead before Brazil's Robinho converted a penalty on 71 minutes.
The Germans made sure of victory when Bayer Leverkusen's Andre Schürrle came off the bench to score the German's third on 80 minutes while Brazil's Neymar scored his side's second in the 92nd minute.
This was the first time the two teams have met since 2003 and with the game at Stuttgart's Mercedes-Benz-Arena being televised in 190 countries, it lived up to it's billing as the clash of two of football's biggest names.
"I am personally pleased that I have so many options now," said Germany coach Joachim Löw after youngsters Götze, Schürrle, Toni Kroos and Thomas Mueller all shone with play-maker Mesut Özil left out to recover after touring with Real Madrid.
"Mario Götze has exceptional awareness and looks to find solutions to every problem on the pitch. "It is the simple things he does which makes him so strong."
This was the battle of the outrageously talented 19-year-old stars: Götze against the spikey-haired Neymar and the German overshadowed the silky-skilled South American.
"That was not the result we wanted," admitted Neymar. "We must now work hard to ensure the victories to come."
Having crashed out of last month's Copa America after losing the
quarter-final to Paraguay on penalties, Brazil coach Mano Menezes is under increasing pressure after one win in his last five games and back to-back defeats.
"The Germans were clear winners, but games like these against the top teams are what we need," he said. "We were slow to get into the game and we weren't as sharp as the Germans."
After a lively first-half, the game exploded into life after the break with five goals in the second 45 minutes.
Löw made good his promise to make plenty of changes to look at players ahead of forthcoming Euro 2012 qualifiers with Austria and Turkey.
Veteran striker Miroslav Klose came on to win his 110th cap in place of Mario Gomez while Schürrle was swapped for Lukas Podolski.
It was AC Milan's Pato who made the first impact when his chip beat Manuel Neuer, but went just centimetres wide of the post with barely a few minutes gone of the second half.
When the goal finally came it was thanks to sheer German perseverance.
Klose produced a deft piece of work to pull back the ball back, Götze sprinted into the penalty area and in the melee Brazil captain Lucio brought down Kroos in the area.
Hungarian referee Viktor Kassai had no hesitation in pointing to the penalty spot and Schweinsteiger made no mistake with the kick on 61 minutes.
Germany could have had another penalty just two minutes later when Thiago Silva placed the ball on the floor with his arm after yet another Götze attack.
It hardly mattered as Götze scored the second goal after a pass from Kroos split the Brazil defence in two and “Goetzinho” – as he has been dubbed by his Dortmund team-mates – rounded Silva and fired home on 67 minutes.
Brazil pulled a goal back when Germany captain Philipp Lahm took out Dani Alves while trying to play the ball and Robinho sent Neuer the wrong way with the penalty on 71 minutes.
Germany sealed their first win over Brazil since 1993 when Schweinsteiger won the ball on the edge of the penalty area and pulled his pass back for Schürrle to score the Germans' third.
Neymar grabbed a consolation goal in time added on but the night belonged to Germany.