Gateways operate at the top layers of OSI model.You select a gateway when you have to interconnect systems built on totally different communications architectures. You would use a gateway to interconnect a TCP/IP LAN to an SNA mainframe, eg.,the 2 architectures have no commonalities, so the gateway must translate the data passing between the 2 systems.
Gateway is a computer that performs protocol conversion between different types of n/ws or applications. Eg.,a gateway can convert a TCP/IP packet to a NetWare IPX packet and vice versa,or from AppleTalk to DEC net,from SNA to AppleTalk and so on.
Gateways function at layer 4 and above in OSI model.
An electronic mail,or messaging, gateway converts messages between 2 different messaging protocols.