A Remote Desktop Gateway server is a Windows 2008R2 server. It acts as the gateway into which RDP connections from an external network connect through to access a Remote Desktop server (Terminal Server) located on the corporate or private network. To use RDGateway, you will need to install a valid SSL certificate. You can hook up RD Gateway and RD Web Access together and even let users use Internet Explorer to connect to your Remote Desktop servers via a Web Proxy. To enable Remote Desktop Servers to be accessed over the internet, you must enable/forward TCP Port 3389 to the Remote Desktop Server.”]
Source: https://turbofuture.com/computers/What-is-Remote-Desktop-Gateway-and-how-to-install