A Safety Car midway through the race looked to move the dial in favour of the Triple Eight squad, only for a late charge from Shahin saw him elbow his way through Prince Jefri Ibrahim coming on to Conrod Straight for the final time.
The Audi driver went on to take the win, with Ibrahim second in the car he shared with van Gisbergen.
Brett Hobson was a scratching from the race, the Nissan Nismo GTR suffering a driveshaft failure late in Saturday's race.
A clear start saw van Gisbergen take the lead from Mostert, who came under the attention of Tander up Mountain Straight for the first time.
On the outside, Tander dropped into third at Griffins Bend, with Brenton Grove fourth from David Wall.
Mostert immediately latched onto the rear of van Gisbergen as they crossed the top of the Mountain, the Audi almost contacting the leading Mercedes.
Van Gisbergen was forced to go defensive at The Chase on Lap 2 as Mostert continued to harry the New Zealander, the top five running line astern – 2.8s covering the quintet at the end of the lap.
The pressure eased slightly on Lap 3, the gap between the front two easing out to almost a second to give van Gisbergen some breathing space for the first time in the race.
Mostert lifted his own pace to remain in contact, the duo eking away from Tander in third.
Sitting second, it was all Mostert needed to best van Gisbergen in the pit stops – the leader carrying a further 10s stationary time over his Audi rival.
There was therefore no need for anything more than to shadow the 2020 Bathurst 1000 winner through the opening half of the race, provided they continued to pull clear of Grove in fourth.
Strategically they needed five seconds over Tander, and 10 to Grove, to ensure Tony Bates would step into the #24 Audi in the race lead at the compulsory stops.
After five laps, the gap to Grove was 6.5s, and Tander 2.9s off the lead.
By the time the pit window opened, Mostert trailed van Gisbergen by a second, with Tander 6.6s off the lead and Grove 15.5s away in fourth.
In the pack, Arthur Abrahams put a bold move on Marc Cini as the pair crested Skyline and dropped into the Esses, the pair going side-by-side as they began the descent down Mount Panorama.
It saw Abrahams boss his way through to claimed 14th, with Cini taking to the lane at the end of the lap.
Mostert and Tander stopped with 13 laps completed, handing their cars over to Bates and Yasser Shahin respectively.
Van Gisbergen, meanwhile, carried on for another lap in a strategy that took him to the very end of the compulsory pit window.
As Bates exited the lane in a net third place, van Gisbergen entered it.
His in-lap was compromised, running wide as he approached to the Dipper as he lost 2.5s in the middle sector.
At the top of the mountain, a mistake from Abrahams saw him tag the wall under the Tree, plucking the left rear wheel off the Audi and drawing the Safety Car.
It was well-timed for Triple Eight, with Ibrahim rejoining the race in the lead from Bates, Grove, and Shahin.
The race went green with 15 minutes remaining, the lapped Marc Cini second on the road behind the leader.
Shahin was immediately on the attack in fourth, getting a good exit out of Hell Corner to put a move on Stephen Grove as they headed up Mountain Straight.
Bates found a way by Cini at Griffins Bend, Shahin having to follow the red Audi across the top of the Mountain and only finding a way by at The Chase.
Grove was through a corner later, the Porsche being allowed through at the final turn.
The delay had seen Ibrahim and Bates open an advantage of more than two seconds, but that was slashed by Shahin once he had clear track.
He was soon on the back of Bates as they squabbled over second with nine minutes remaining.
Bates was stout in his defence, placing his R8 well to deny Shahin's initial attempts.
It was good news for race leader Ibrahim, who was able to stretch out a 2.5s advantage as the battle behind was waged.
Shahin looked to have a dive at The Chase on Lap 20, but the door was closed and the battle continued.
Two corners later, the move was complete as Shahin out-braked Bates at Griffins Bend, rounding the outside of the car formerly piloted by Mostert.
His deficit to Ibrahim was some two seconds, a gap that was quickly eaten into with four minutes of the race remaining.
In the pack, Greg Taylor nosed into Adrian Deitz, sending the latter through the gravel at The Chase and the former into the lane with a holed radiator.
With two minutes to run, Shahin was on the leader, setting up a barnstorming finale.
A slide on exit of The Chase cost the Audi time, and any chance of an attempt of making a move at Murray's, or the first as they began the final lap.
Ibrahim had enough of an air gap into Griffins Bend, where Shahin had put a move on Bates earlier.
There was no opportunity across the top of the Mountain, though the Audi menaced the rear of the Mercedes, clearly the faster of the two.
Shahin threw the R8 up the inside at Forrest's Elbow, making the move stick to head the field as he headed down Conrod Straight for the final time.
He was then untouched to the flag, ultimately claiming victory by 0.8s over Ibrahim in a performance that ended a streak for van Gisbergen that stretched back to September 2020.
It was the first time the Kiwi hadn't stood on the top step of the podium at the end of the race since the penultimate race of last year's Supercars Championship.
Since then, he'd won the Bathurst 1000 (with Tander), New Zealand Grand Prix, enjoyed a perfect run at the start of the 2021 Supercars campaign, and won Saturday's GT race at Bathurst.
Brad Schumacher won the Trophy class, while Tony Quinn was again the leading Am class runner to the flag.
The Bend hosts the next round of the GT World Challenge Australia championship, Round 3 of the competition, on May 7-9 in support of the Supercars Championship.