Doesn't China have to comply with this closure order?
I'd say so. Per Vienna Convention on Consular Relations, of which China is a signatory:
TERMINATION OF THE FUNCTIONS OF A MEMBER OF A CONSULAR POST
The functions of a member of a consular post shall come to an end inter alia:
(a) on notification by the sending State to the receiving State that his
functions have come to an end;
(b) on withdrawal of the exequatur;
(c) on notification by the receiving State to the sending State that the receiving State has ceased to consider him as a member of the consular staff.
If the United States has formally notified China of any of these conditions, China no longer has any right to run a consulate in Houston.
Consulates, in general, exist at the forbearance of the host country.
Per Wikipedia:
Contrary to popular belief, many of the staff of consulates may be career diplomats, but they do not generally have diplomatic immunity unless they are also accredited as such. Immunities and privileges for consuls and accredited staff of consulates (consular immunity) are generally limited to actions undertaken in their official capacity and, with respect to the consulate itself, to those required for official duties.
If the host country has withdrawn permission for the consulate to exist, there are no longer any "official duties" for anyone working there to perform.
If China were to try to continue running the consulate, the US would have multiple options, likely up to and including physically detaining any Chinese officials performing such acts and summarily putting them on a plane to China. Or perhaps even revoking diplomatic immunity (as they would be operating outside defined bounds) and arresting them.
Houston is literally over 10,000 km from China. If the United States wants the Chinese consulate in Houston closed, there really isn't anything China can practically do to stop it.
What can China do? This:
China Orders U.S. to Close Chengdu Consulate as Payback for Houston Move
Now, the United States can't really do anything about keeping its Chengdu consulate open. All the things the US can do to force the Chinese consulate in Houston to close, the Chinese can also do to the US with respect to the US Chengdu consulate.