At half-time Germany were heading out of the tournament, trailing to Ola Toivonen's deserved opener for Sweden.However, Marco Reus and Toni Kroos combined for a 2-1 win to rescue them from World Cup elimination.
Germany had looked destined to become the latest side to fall victim to the curse of the world champions . In truth, though, bad luck would have nothing to do with their exit.
They had just been plain bad during the opening 45 minutes at the Fisht Stadium - and Boateng perfectly personified their collective failings.
The Bayern Munich defender was atrocious here in Sochi, dismissed after 82 minutes for collecting two yellow cards during one of the worst exhibitions of defending in World Cup history.
He was as reckless in his tackling as his passing, a walking liability, and one of the principal reasons why Germany were facing elimination until the recalled Reus levelled matters just after half-time before then teeing up Kroos for a stunning free kick in the dying seconds.
Essentially, Germany had both finished and started the stronger of the two sides. Early on, they had looked to have recovered from the shock of losing their tournament opener, against Mexico.
Low's bold decision to drop Mesut Ozil and Sami Khedira reinvigorated the German midfield and forward line. Timo Werner, Reus, Julian Draxler and Thomas Muller changed positions at a dizzying pace in a bright opening quarter of an hour.
Draxler should even have scored inside five minutes but he shot straight at defender Andreas Granqvist after the ball had dropped for him in the area. However, Germany's defensive deficiencies hadn't disappeared, not with Boateng still on the field.
The suspicion was that Sweden's forwards lacked the pace to take advantage in the same manner as Mexico but with virtually their first foray forward, Marcus Berg was put clean through on goal.
However, as he shaped to shoot, Boateng gave the striker a nudge that sent Berg tumbling to the floor and the ball rolling harmlessly back into the arms of Neuer.
Incredibly, referee Szymon Marciniak didn't just ignore the animated and justified appeals for a penalty, he also elected against employing the VAR to review the incident.
Strangely enough, that injustice actually worked against Germany. Perhaps it inspired the Swedes to right the wrong but, more likely, they were more encouraged by the ease with which they had pierced the German backline.
The Scandinavians had realised that where there's Boateng, there's a way to score. As a result, the underdogs grew in confidence. They began to attack more regularly and with even greater menace. Germany, by contrast, suddenly lost self-belief. The surprising nervousness that had so baffled Low in the Mexico game returned.
Nobody was immune from the malaise affecting the men in white. Indeed, it was match-winner Kroos, Germany's best and most reliable player, who gave the ball away in the lead-up to the goal with which Sweden opened the scoring.
The Real Madrid midfielder, criminally, squandered possession in his own half in the 32nd minute and Sweden pounced, with Toivonen lifting the ball over Neuer - with the slight aid of a deflection form Antonio Rudiger - after brilliantly controlling Viktor Claesson's cross from the right.
Germany's confidence looked shot. They were arguably fortunate not to concede again before the break, indebted as they were to Neuer for a good save from Berg's header right on half-time.
The interval, though, allowed Germany to clear their heads, and Low to get to work. He removed the maddeningly frustrating Draxler and threw Mario Gomez on in his place. The 32-year-old went straight up top, with Werner pushed wide. The tactical change paid almost immediate dividends.
Just three minutes after the restart, the pacy Werner beat his man and pulled the ball back across the goal. Gomez couldn't convert but Reus was on hand to guide the ball with an improvised finish with his left knee.
It was undeniably fortuitous but who would really begrudge the Borussia Dortmund striker his slice of good fortune? Four years previously, he had gone to bed rather than watch Germany's World Cup celebrations as he was so distraught at being denied the opportunity to be a part of them through injury.
This was an overdue and thoroughly deserved goal. Reus had rescued them from defeat, and Kroos then inspired them to victory. No thanks to Boateng, though.
With Germany desperately trying to find a winner, he got himself stupidly but wholly unsurprisingly sent off for a second yellow card.
However, perhaps boosted by his absence, Germany pressed forward and had already twice gone close to scoring through Gomez and substitute Julian Brandt when Kroos snatched all three points.