I am also getting the same error
The computer can't connect to the remote computer because the Terminal Services Gateway server is temporarily unavailable.
Recent Change Implemented: Renewed Wild Card Certificate
Issue: This issue occurs only when users are connecting from outside network but when they try to access RDS withing network it works flawlessly
Steps Followed So far;
1) Verified RDGateway Certificate and its expiry date
2) Verified Internet Explorer Settings - TLS1 , 2 and 3
3) Imported Server Certificate into the client machine's trusted root store
4) Verified Public facing domain and its resolution over internet
5) TSGateway service Restarted
6) Created/Edited a 32 bit DWORD value called RDGClientTransport in Client Machines registry at Computer\HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\PublisherBypassList
7) IIS -> Default Web Site -> RDWeb -> Pages -> Application settings -> Defaults TS Gateway (Verified URL)
Please help