The visiting Cowboys led 8-4 at the interval but were undone by two tries in the space of four minutes, as Shaun Johnson played a key role with hands and boot.
The Sharks had won the previous two meetings with the Cowboys and six of the past eight, but they fell behind three minutes in when Scott Drinkwater sprinted clear to score.
Ronaldo Mulitalo levelled after 36 minutes from Johnson's pass, but Matthew Scott restored the Cowboys' advantage just three minutes later, powering through a defensive blockade to spin and dot down just before the interval.
Francis Molo then scrambled through to reach a loose ball from Jake Granville's deflected grubber and Jake Clifford converted after missing his two first-half attempts, ensuring the Cowboys held a 10-point lead with 45 minutes played.
Sharks pressure began to mount but some exceptional last-ditch defending, most notably Drinkwater's try-saving tackle on Mulitalo, kept the home side at bay.
That all changed 64 minutes in, though, when Josh Dugan dived over after being released by Johnson, who added the extras.
Bronson Xerri made it 14-14 when he darted between challenges to score near the posts, and Johnson duly converted to complete the turnaround, as the Sharks ended a five-game losing streak to move ninth in the standings.
— NRL (@NRL) July 25, 2019
Photo Getty Images. Caption; Cronulla Sharks celebrate a try from Ronaldo Mulitalo (R)