Zhang, gunning for her second gold in the singles after winning in Athens four years ago, downed the world number six 9-11, 11-8, 12-10, 11-8, 11-5.
Li had been hoping for an upset after winning silver in the team competition, the city-state's first medal in 48 years.
Zhang plays the winner of the second semi-final between teammates Wang Nan and Guo Yue later on Friday for the gold.
Li came out firing in the first game with some aggressive shots, racing ahead before Zhang saved four game points, only for the Singaporean to edge over the line 11-9. But the world number one steadied in the second, taking an early lead and then holding off the Beijing-born Li.
Li went 6-3 up in the third but Zhang once again fought back to level at 6-6 with a scorching cross-court forehand.
The pair matched point for point for 10-10 before Li, with the pressure on both players mounting, pushed the ball too far, missing the table, handing Zhang the game.
In a tightly fought fourth game, featuring numerous fast and furious rallies, Zhang edged ahead when Li netted.
Zhang, sensing victory, powered ahead in the last as Li wilted, the Chinese player winning when Li netted.