Having made a mistake on his critical run in Saturday's qualifying session, van Gisbergen was flawless this time around.
His first run was a 1m30.383s that left him second, right behind race 1 winner Brodie Kostecki.
He then improved to a 1m29.910s on his second run, which left him 0.05s ahead of fellow Kiwi Heimgartner.
The pole was a perfect response to a difficult Saturday race for van Gisbergen, who raced from 20th on the grid to third, only to be handed a five-second penalty for contact on Will Brown on the final lap.
That dropped him to seventh in the final classification.
"I've just got to thank the team," said van Gisbergen after taking pole this morning.
"I'm struggling with this [Gen3 car], but the car is awesome and obviously Broc [Feeney] is third as well.
"The team has done a great job. Let's see what happens, let's see how they try and take this one off us."
As mentioned by van Gisbergen, Feeney made it a Triple Eight one-three behind Heimgartner.
Bryce Fullwood made it a Brad Jones Racing two-four, while Kostecki was shuffled back to fifth despite improving on his final lap.
Cam Waters was the best-placed Ford in sixth ahead of Mark Winterbottom.
David Reynolds qualified eighth, an impressive effort given his monster 38G shunt last night. The Grove Racing crew was at the circuit until 5am repairing the Penrite Mustang.
Anton De Pasquale was ninth fastest and Will Brown 10th.
It was a shocker of a session for Will Davison who was just 23rd fastest in his DJR Mustang.
Nick Percat faired even worse, qualifying last for Walkinshaw Andretti United.
The second and final race of the weekend kicks off at 3:30pm local time.