After Roberto Bautista Agut beat Steve Darcis's replacement Kimmer Coppejans 6-1 6-4 in the first singles match, a win for Nadal would have sent Spain through to the semi-finals in Sydney.
However, Goffin got the better of the 19-time Major winner for only the second time in his career with a fine attacking display.
The Belgian was unable to consolidate his first break of the opening set but, after staving off a trio of break points in game eight, he did not fail at the second attempt.
Goffin continued that momentum with a break early in the second, before Nadal fought back to force a tie-break.
However, the world No.1 double faulted at 5-2 down to give Goffin four match points and he only needed two attempts to convert and take the tie the distance.
"I felt my tennis the other match against Grigor [Dimitrov]…the confidence came back and I was ready for the fight tonight," Goffin said on court.
"From the first point until the end it was not easy, I was up a set and a break and I had to hold my nerves until the end. I played a very good tie-break, some tough games towards the end of the second to hold my serve but at the end I'm so happy for Belgium to have a decisive doubles.
"I knew Rafa had to take the ball a little bit early, maybe to take some more risks because I was in the court trying to dictate all the time and he had to find a solution. He finds a solution most of the time so I had to stick to my line and continue to move forward."