A gateway is a communication instance that translates (call) data between different networks (e.g., IP and PSTN) or protocols. A signalling gateway translates between two or more signalling protocols (like H.323 or SIP), while a media gateway usually performs transcoding of media streams (e.g., G.711 to GSM).
Of course a gateway may as well combine all functionality described above.