A port is a destination. The gateway is the program listening on this port and rerouting requests elsewhere. Usually after adjusting for something or simplifying talking to old/new equipment/services. Internet is just one way of communication. Often a gateway enables talking between different communication ways.