The former world number one was a set and 4-1 down to Johansson before digging deep into the reserves she has amassed over her long career to triumph 3-6 7-5 6-4 in Perth.
The Frenchwoman played fearlessly in the first set, taking Williams by surprise, although the American misfired with her forehand and she was clearly in some discomfort.
However, the seven-time grand slam champion refused to give in and as she began to claw her way back into the game Johansson started to make mistakes.
With the score at 4-1, and Johansson closing in on victory, Williams reeled off three consecutive games before getting the decisive break to go 6-5 up and then serving out the set.
In quotes reported on the Hopman Cup website, Williams said: "Mathilde's a tough player. She hits the ball hard and low, and I'm tall so it's hard to get low.
"I was just thinking, at least if I'm going to lose this match, I was going to try to work on my game. In the end, I got a win for the US."
Victory levelled the tie at 1-1 after Jo-Wilfried Tsonga had swept past Isner 6-3 6-2 in 55 minutes.
Tsonga was sharp from the outset, moving his opponent around the court and timing the ball perfectly.
Isner, the world number 14, struggled increasingly as the match wore on and two quick breaks in the second set saw Tsonga take a 5-1 lead.
Isner held his serve to love but it was merely delaying the inevitable as Tsonga closed out the match.
Williams and Isner then teamed up to win the mixed doubles 6-7 (5/7), 6-2 10-8 against Johansson and Tsonga.