A gateway is a piece of networking hardware used in telecommunications for communications networks that allows data to flow from one discrete network to another. Gateways are distinct from routers or switches in that they communicate using more than one protocol and can operate at any of the 7 layers of the OSI model.