Having missed three chances to close out the match on his own serve, the Austrian finally won at close to midnight when Gojowczyk -- serving to stay in the match -- whipped a forehand that sailed just long.
Thiem, a two-time French Open semifinalist, has dropped in form considerably since losing to Argentine Juan Martin del Potro in a five-set thriller in the fourth round of this year's US Open. He next faces either US Open runner-up Kevin Anderson of South Africa or Spaniard Fernando Verdasco in the third round.
In Tuesday's other second-round matches, Frenchman Nicolas Mahut secured an upset 6-4, 6-1 win against eighth-seeded Pablo Carreno Busta of Spain, and another surprise reverse saw No. 10 Sam Querrey of the United States losing 6-4, 6-4 to Serbian qualifier Filip Krajinovic.
The defeat dents Carreno Busta's chances of qualifying for the season-ending ATP Finals in London -- he is dependent on other results here -- while Querrey's bid to reach London is over.
Overcoming an early break of serve, Mahut took the first set with a forehand winner down the line, breaking Carreno Busta's serve for the second time.
The 35-year-old Frenchman saved five break points but secured a double break on the Spaniard's serve to move 4-0 up in the second set.
Querrey dropped his usually reliable serve three times against the 77th-ranked Krajinovic, who next meets Mahut.
Edmund, who had 10 aces, next faces 16th-seeded American Jack Sock.
In Wednesday's second-round matches, Rafael Nadal can guarantee finishing the year as No. 1 for the fourth time in his career if he beats Hyeon Chung of South Korea. The Spaniard last achieved the feat in 2013, with Novak Djokovic and Andy Murray holding the top ranking since then.
Del Potro, a runner-up to Roger Federer at the Swiss Indoors on Sunday, is in second-round action against Sousa. The 13th-seeded del Potro needs to win here to reach the Finals in London next week.
Federer skipped Paris to stay fresh for London, where he will aim to win his eighth title of the year.