For the second race running it was a dramatic first lap, James Courtney the unlucky driver to end up in the wall this time around.
That prompted a lengthy safety car as the ruined Mustang was retrieved and repairs made to the barriers.
Van Gisbergen, meanwhile got past David Reynolds for seventh, but didn't make much headway after that until the stops.
Feeney made his stop on Lap 18, followed by De Pasquale and Heimgartner on the next lap.
Heimgartner managed to jump both of those drivers in the process as he took over the effective third position.
On Lap 21 Waters took his service which prompted Davison to cover from the lead a lap later.
That was when Davison's race, and his shot at the Jason Richards Trophy, unraveled, his car released without its left-rear properly attached.
That left Waters in the lead, while van Gisbergen, who stopped on Lap 25, emerged as a contender as he jumped Feeney in the stops and set after Heimgartner.
He passed his fellow Kiwi at the chicane on Lap 31 before hunting down Waters.
The pair then staged a thrilling battle for the lead as van Gisbergen consistently tried to pass Waters at the hairpin, and Waters defended staunchly through the fast complex onto the main straight.
The battle turned physical on Lap 35 when van Gisbergen got into the back right rear quarter of Waters through Turn 11.
Three laps later, and three laps from the end, the hometown hero finally got the jump done, sliding up the inside of Waters at Turn 11 to seal victory in the final ever Supercars race at Pukekohe.
The win also sealed the Jason Richards Trophy for van Gisbergen in what was a fitting end to the Pukekohe era.
"Unbelievable," said van Gisbergen. "From eighth I didn't think we could do that. Things were playing out and the car was amazing.
"I just didn't give up, I just kept throwing it at it. Cam had me pretty good, I couldn't get him. Then the next time I wasn't lifting..."
Van Gisbergen will now head to the Bathurst 1000 with a 525-point series lead over Waters.
Waters finished second while Heimgartner made it two Kiwis on the podium with third place.
Reynolds finished eighth from Nick Percat and Tim Slade, while Davison was left down in 22nd after making a second stop to have his wheel issue rectified, and copping a 15-second penalty for an unsafe release.