The Belgian had never previously beaten Djokovic in five matches against the former World No 1 – and had won just one set – but held his nerve to reach the semi-finals with a fine 6-2, 3-6, 7-5 win.
Goffin was previously 0-14 against top three opponents, with his win against Djokovic comfortably ranking as the biggest in his career.
He will now play either Rafael Nadal or Diego Schwartzman for a place in the final.
Goffin will be joined in the last four by Albert Ramos-Vinolas, who won the last four games to beat fifth-seeded Marin Cilic of Croatia 6-2, 6-7 (5), 6-2.
Cilic, the 2014 U.S. Open champion, seemed to be in command when he broke at the start of the third set. But the Spaniard rallied to set up a semi against Lucas Pouille of France, who beat Pablo Cuevas of Uruguay 6-0, 3-6, 7-5.
Pouille reached the quarterfinals at the U.S. Open and Wimbledon last year in his breakthrough season.
"Lucas is coming through very strong," Ramos-Vinolas said. "It will be super difficult."
Ramos-Vinolas needed 2 1/2 hours to win, but could have got there faster after leading 5-3 in the tiebreaker — only for Cilic to level the set score with a volley that only just landed in. He puffed his cheeks in relief.
Cilic won their only previous match on clay five years ago in Hamburg, Germany, but the Spaniard looked sharp here early on. He broke Cilic in the third game and clinched the first set when Cilic's cross-court backhand went out.
Ramos-Vinolas won on his first match point when Cilic double-faulted.
Cuevas was poor in the first set against Pouille, winning no points on his second serve and failing to save any break points. He started to find range with his one-handed backhand in the second set and leveled the set score when Pouille netted a return.
The decider was anyone's guess.
Pouille thumped two heavy forehands to hold serve easily at the start and then broke Cuevas for 2-0.
But Cuevas reeled him back in and served for the match at 5-4.
Pouille stepped up his game and a cross-court backhand gave him break point, which he took when Cuevas sank a backhand into the net.
With Cuevas on serve again at 5-6, Pouille clinched victory on his second match point when the former hit another backhand long.Reuse content