Williams scored a 45-metre try on the buzzer after pouncing on a grubber kick from Isaac De Gois who broke the Rabbitohs' line before finding his winger much to the delight of the crowd of 16,423 at Toyota Stadium.
Cronulla were trailling 7-6 with 12 minutes remaining after Adam Reynolds potted a field goal.
But the Sharks hit the lead in the 69th minute through powerful young forward Tyson Frizell, who barged over to score a converted try before Todd Carney slotted a penalty three minutes from fulltime to make it 14-7.
But following a host of late finishes involving Souths this year, Sharks fans had a tense run to the fulltime siren.
The win lifted Shane Flanagan's side above North Queensland and into fifth place with the Cowboys to play St George Illawarra on Monday night.
Souths have now lost two straight games for the first time this season but remain in third spot.
Cronulla led 6-0 at halftime with the Sharks scoring the only four-pointer of the opening 40 minutes through prop Andrew Fifita after great lead-up work by halfback Jeff Robson.
Souths looked completely out of sorts early but did manage to pepper Cronulla's line late in the half only to be repelled by some stoic defence.
The game opened with Souths second-rower Dave Taylor fumbling the kick-off before putting a foot into touch and with the exception of some dangerous kick returns from fullback Greg Inglis, the Rabbitohs looked very flat in attack.
Souths came to life early in the second half and levelled the scores when Sam Burgess powered his way over the line on 54 minutes after a simple switch of the attack by John Sutton but for the most part they were outclassed by Cronulla.