The term gateway has had various incompatible meanings in data networking over time.
In the early days of the work on what later became the Internet, it was the term used for the devices later named routers; the name was changed because of the existence of other types of devices (below) also called 'gateways'.
Application layer devices which allowed users on one side access to similar, but different, services on the other side were also commonly called 'gateways'; email gateways between various 'walled garden' email systems were especially common.
This disambiguation page lists articles which all may be referred to by the title term.
If an internal link led you here, you may wish to change the link to point directly to the intended article.