Thompson, 31, tore the anterior cruciate ligament in his left knee in 2019, before tearing his right Achilles tendon during his recovery, BBC Sport reported.
The three-time NBA champion hit 17 points in front of a lively Chase Center crowd in San Francisco.
"I'm never going to forget this night," Thompson told NBA TV.
Thompson scored the Warriors' first basket of the game and hit seven of his 18 shot attempts, including making three three-pointers.
It took him past 12,000 points and 1,800 three-pointers in his career.
Warriors star Stephen Curry hit 28 points as his side hit back from two consecutive defeats.
They are now tied with Western Conference rivals the Phoenix Suns for the best record in the NBA on 30 wins and nine defeats.
Thompson last played in game six of the NBA Finals in June 2019, when he tore his ACL against eventual champions the Toronto Raptors.
He then tore his Achilles in training in November 2020 and missed the whole of last season and most of the first half of the current campaign.
Elsewhere, the Brooklyn Nets beat the San Antonio Spurs 121-119 in overtime, with rookie Cam Thomas hitting the game-winner with 1.7 seconds remaining in the first overtime period.
Kevin Durant led the Nets with 28 points, while James Harden scored 26.