The giant nation were all at sea as they fell behind to Supachai Jaided's opener but they hit back after the break through substitute Xiao Zhi and Gao Lin's well-taken penalty.
It meant China live to fight another day under Lippi, who is expected to step down after the Asian Cup, while Thailand will know they were beaten by a superior team.
"I'm very satisfied with the win. It was not an easy game because the opponent was very tough," said Lippi, who coached his native Italy to victory at the 2006 World Cup.
"We didn't play very well in the first half because we made a few mistakes but I'm very happy with the reaction from my players, especially in the second half where in the end we created many chances.
"It was a great performance in the second half, so I'm very happy for the victory and the fact that we got to the quarter-final."
In an open start, Theerathon Bunmathan saw a free kick tipped over and Wu Lei had an attempt smothered by Thai goalkeeper Siwarak Tedsungnoen before Thailand went ahead on 31 minutes.
From a corner, in front of Thailand's drumming and singing fans, Thitiphan Puangjan's miscued shot fell to Supachai, who turned and rammed it past Chinese goalie Yan Junling from close range.
Supachai Jaided reacts after scoring a goal for Thailand.
- 'No shame in losing' -
The chances were falling thick and fast for Thailand and the "Thai Messi" Chanathip Songkrasin was adjudged to have fouled Feng Xiaoting as he jinked his way into a scoring opportunity.
China looked distinctly rattled, but they nearly hit back just before half-time when Yu Dabao flashed his header wide from Hao Junmin's free kick.
China's star man Wu Lei, who missed their final group game with a shoulder injury, missed a series of chances after the break, including one when he embarrassingly sliced an easy shot well wide.
But a resurgent China were piercing the Thai defence again and again and on the hour mark, only Siwarak's legs preserved Thailand's lead when he parried Yu's goal-bound shot from point-blank range.
China finally scored midway through the second half when substitute forward Xiao, three minutes after coming on, headed straight at Siwarak before prodding home the rebound.
The onslaught didn't stop and after Gao was brought down by Chalermpong Kerdkaew, he nervelessly swept the spot-kick high into the net for a 2-1 lead.
Thailand weren't going down without a fight and in injury time, Teerasil Dangda wasted a good chance and Pansa Hemviboon had Yan at full stretch with a powerful shot.
But ultimately it was China who joined Vietnam in the last eight, after the Southeast Asian champions stunned Jordan on penalties after a tense 1-1 draw in Dubai.
It ends a rollercoaster tournament for Thailand, who sacked their coach Milovan Rajevac after their 4-1 drubbing by India but recovered well to reach the last 16.
"It's a shame we couldn't qualify for the last eight but this is already a bonus given how we started the competition," said interim coach Sirisak Yodyadthai.
"It's a pity that we couldn't keep it at 1-0," he added. "I'm very proud of the players, there's no shame in losing."