Difference between gateway and router?


Hi all,
I wish to know the exact differences between the gateway and the router.

As far as I know is that the router helps connect two (or more) networks that have different IP adresses ranges (exp 192.168.x.x and 10.17.x.x) as for the gateway it helps connect two (or more) networks from different natures (exp local network and internet).

If my information is correct, why many articles treat gateways exactly like the routers?