RD Gateway, or Remote Desktop Gateway, is a Microsoft role that lets authorized users connect to remote desktops and applications from outside the network over an encrypted HTTPS connection. Instead of pointing RDP at the internet, traffic goes to the gateway, which forwards it to the right machine.

RD Gateway is a smarter way to provide remote access. It wraps RDP in a secure encrypted tunnel, lets you enforce authentication and access rules, and requires only a single port (443) to be open rather than exposing the whole RDP service to the internet. That cuts the attack surface attackers constantly scan for.