Thomas Müller, who grabbed a double in the corresponding fixture in Dortmund last year, opened the scoring in the 18th minute.
In full flow the Germans appeared unplayable as Scotland struggled for possession, yet Gordon Strachan's side grabbed a 27th minute equalizer as the usually reliable Manuel Neuer's attempted clearance of Shaun Maloney's free-kick bounced in off defender Mats Hummels.
Müller headed Germany back in front seven minutes later before James McArthur restored parity for a second time with a sensational strike in the 43rd minute.
Bayern Munich star Müller then turned provider for Ilkay Gündogan to put Germany ahead for the third time in the 54th minute.
Scotland now face a mammoth task to even claim a play-off place as they trail third-placed Ireland, who defeated Georgia 1-0, by four points with two games remaining. Poland's 8-1 demolition of Gibraltar kept the Poles two points behind Germany in second.
At Hampden, Germany's total dominance of possession paid off when Müller broke the deadlock. The Bayern Munich star burst at pace at a terrified Scottish defence before drilling a low shot that took a deflection off the heels of Russell Martin to leave David Marshall completely wrong-footed as it rolled into the bottom left-hand corner.
Scotland surprised the World Cup winners with an unlikely equaliser. After Charlie Mulgrew was fouled by Emre Can on the edge of the box, Maloney whipped in a dangerous free-kick that Neuer failed to deal with as the keeper's flapped clearance went in off Hummels.
However, Scotland weren't level for long as Müller restored Germany's lead. Marshall could only parry Can's shot and Müller was alert enough to nod the rebound over the line despite Scotland's desperate efforts on the line.
Things looked ominous when Götze had the ball in the net for Germany again after collecting a pass on his chest before spinning to send a half-volley past Marshall but the flag was already up for offside.
Hampden erupted, however, as McArthur's sensational strike pegged Germany back for the second time. The Crystal Palace midfielder met Maloney's corner at the edge of the box to rifle a volley that Neuer got fingertips to.
Germany started the second half in menacing fashion and had the ball in the net again when the unmarked Götze fired a Bastian Schweinsteiger pass past Marshall but the Bayern Munich forward was flagged for offside.
The Germans didn't have to wait long for their next opportunity and Gündogan soon made it 3-2. Müller turned provider as he cut the ball back from the byline perfectly for the Borussia Dortmund defender to slam home his shot in off the base of the post.