Aleksandar Mitrovic struck for Serbia after five minutes, thudding home a brilliant header from Dusan Tadic's cross. The Serbs went on to dominate the first period and spurned chances to double their advantage.
They paid for it quickly after the break, as Granit Xhaka smashed a stunning equaliser home from the edge of the box.
Then, just as the game appeared to be petering out into a draw, Shaqiri somehow found himself in acres of space and tucked home when through on goal. Switzerland now sit in second place in Group E on four points, with Serbia third on three.
Earlier in the day in Group E, Brazil earned their first win of the campaign thanks to two late goals from Philippe Coutinho and Neymar, putting them on four points from their two games.
Swiss Midfield Cannot Keep Papering Over Forwards' Lack of Production
After a difficult first period, Switzerland needed someone to grab hold of the game for them. Xhaka did exactly that.
Seven minutes after the break he stepped onto a loose ball on the edge of the penalty area and fizzed an extraordinary strike past Vladimir Stojkovic in the Serbia goal:
The shot was not only hit with an incredible amount of ferocity, but the spin on the ball and the way in which Xhaka struck it completely wrong-footed the goalkeeper as well. It was past him in a flash, and the Swiss were level.
It's the sort of thing we've seen from the midfielder on occasion during his time at Arsenal and Borussia Monchengladbach, although nowhere near enough. As noted by journalist Matt Scott, for the Gunners his shooting has been somewhat errant:
The goal did trigger something in the Swiss. Shaqiri came close to putting Switzerland ahead with another long-range effort, but the Stoke City man could only watch his shot curl onto the far post and out for a goal kick. The best was yet to come from him, though.
Mitrovic's Performance Proves He's a World Cup Force
Having struggled to make an impact at Newcastle United, Mitrovic was sent on loan to Fulham for the second half of the 2017-18 season and thrived. He appears to have carried that form into the World Cup.
From the off he was a threat to Switzerland here, showcasing his aerial prowess early on with bullet header past Yann Sommer. As noted below, he's had a tremendous 2018:
It wasn't just the goal that made the Serbia No. 9 so influential here, though, as he led the line well for his side.
Mitrovic showed his all-round ability, winning aerial battles, holding the ball up and bringing the talented playmakers in the rest of this Serbia side into play. It was a reminder of what he can do when he channels his best attributes and aggression in the right manner.
Journalist Kristan Heneage and Matthew Stanger had their say on the powerhouse forward:
In the second half, he was also unlucky not to earn his side a penalty, as he appeared to be held down by two Swiss defenders. Had that been awarded, the end result could've been a lot different.
Shaqiri Continues to Prove Clutch Credentials on Biggest Stage
Big moments on the big stage are nothing new for Shaqiri. At the 2014 World Cup, he scored a hat-trick against Honduras, while at the 2016 UEFA European Championship he scored a remarkable overhead kick against Poland.
Here he added another chapter to his expanding highlight reel for the Swiss.
With the clock ticking down Serbia inexplicably let the winger find space on the halfway line, and after a ball forward he found himself one-on-one with the goalkeeper. From there, with the defender closing in, the winger kept his composure and tucked a neat finish past Stojkovic.
Stefan Buczko praised the style in which he managed such a big moment:
Meanwhile, Patrick Boyland lamented the fact we don't see Shaqiri in this type of form more often:
The 26-year-old certainly has the potential to win matches for this side when he's on it; it's why it's not a surprise he's been linked with a move to Liverpool lately, per Paul Joyce of the Times.
His focus will remain on Switzerland for now, though, and if he adds to his haul of major tournament moments, his nation have the potential to make a deep run in this World Cup.
All four teams in Group E will play their third games at 7 p.m. (BST) on Wednesday.
Switzerland will take on Costa Rica in their last outing, whereas Serbia take on one of the pre-tournament favourites to win the competition in Brazil.