Super 15 - Sharks alive after beating NSW
The 20-year-old Springbok prodigy scored an excellent individual try and followed it up with four penalties and two conversions to give the Sharks their eighth win in 13 matches.
The result moved them to within five points of the Stormers at the top of the South African conference of the 15-team southern hemisphere competition.
"I don't think we got the upper hand in the front row but we survived," Sharks captain John Smit said. "I'm pretty happy with the boys. They kept at it and kept the pressure on."
It was the Waratahs' fifth loss in 13 outings and they remain second in the Australian conference, eight points behind arch rivals Queensland Reds.
In a free-flowing match, the visitors opened the scoring in the fifth minute through a penalty by fullback Kurtley Beale before Sharks flyhalf Lambie crossed for the first try five minutes later.
Lambie received the ball from a scrum 30 metres out and dummied his way through a midfield gap to dive over at the posts and then convert to make it 7-3.
Lambie scored two penalties and Beale one penalty before Waratahs winger Lachlan Turner swung the momentum when he crossed in the left-hand corner just before halftime for an amazing length-of-the-field team effort.
The Sharks had looked set to score at the other end but when they gave away possession on the Waratahs' line flyhalf Daniel Halangahu ran 80 metres upfield from the turnover before feeding Turner with a perfectly timed pass.
Halangahu then scored himself shortly after the break with a good inside step and Beale's conversion gave the Waratahs a five-point lead.
That increased to eight after 50 minutes when Sharks flanker Jean Deysel was yellow-carded for foul play, allowing Beale to kick his third penalty.
The flagging Sharks needed something special if they were to fight their way back and they found it in the form of resurgent Springbok wing JP Pietersen, who sprinted in from 65 metres after picking up a spilled Waratahs ball.
Lambie's conversion and a 70th-minute penalty gave the Sharks a 23-21 lead as the clock wound down, with the flyhalf sealing matters with a fourth penalty with a minute remaining.
"We had our opportunities to win it but ill discipline cost us," Waratahs skipper Dean Mumm said. "We defended pretty well but didn't do enough."