The win was the Warriors' third in succession after back to back defeats of Wests Tigers and the Broncos, while Johnson's 15th career field goal secured his 100th NRL victory.
The Cowboys dominated most of the game and led 18-6 until just before halftime, when a Chanel Harris-Tavita 40:20 kick gave the Warriors a late opportunity to score and they capitalised.
The lead see-sawed in the second half until the match was decided in golden point when Johnson landed his third field goal attempt.
Match snapshot