Foley, who surpassed Matthew Burke's record of 959 points with a third-minute penalty goal at Brookvale Oval, had landed all five of his earlier attempts on Saturday night.
But with just over a minute left, the normally reliable pressure kicker failed to land a penalty from just beyond 30 metres, to the horror of most of the 17,111 sellout crowd.
The Waratahs led 12-10 at halftime, and 19-13 midway through the second spell after the Hurricanes had two tries disallowed. They continued to pile on the pressure, and were rewarded with little more than five minutes to go when Du'Plessis Kirifi raced through some tired defence and Jordie Barrett converted.
Replacement forward Kirifi went from villain to hero. He had earlier been responsible for a try to flanker Ardie Savea being rubbed out, after a review showed he caught Waratahs captain Michael Hooper high with a forearm.
The Hurricanes had another five-pointer overturned on review a few minutes later, when Ben Lam was shown to have put a foot in touch.
"We got two tries disallowed and finally got over, so they showed a lot of character," Hurricanes coach John Plumtree said.
A big scrum earned the Waratahs a late chance to steal the game, but Foley was off target.
"I think Jordie might have been next to me and we were just telling him 'please pull it bro, please pull it', and lucky enough he did," Hurricanes captain TJ Perenara said.
The first half was a stop-start affair, with both teams conceding seven penalties.
Referee Angus Gardner issued a formal warning to each captain for the frequent infringements.
The Hurricanes' only lead of the first half, 10-9, came when Barrett converted a try to flanker Savea, who burrowed over the line after multiple close-range phases.
The Waratahs had some set piece and discipline issues, but coach Daryl Gibson was pleased with a strong debut from centre Karmichael Hunt.
"We lacked sustained periods of time with the ball, whether we lost it in lineout, lost it in phase play," Gibson said.
"We were never really able to exert enough pressure on the Hurricanes."