router vs. gateway
The difference is very clear but it depends upon what do you mean
by gateway
1-if you mean it as a device/equipment So it is the data network device that can
convert from full protocol stack to another like from DoD to ISO OSI or SNA
Appletalk OR novell netware , So it can work up to layer 7
but router can do just layer3 PDU (IP packet , X25 packet, IPX , or ISO OSI CLNS )
FORWARDING, DROPPING , REROUTING by find the best route which depends
upon the calculation of the metric equation which depends upon the used routing
protocols like (RIP , OSPF, IS-IS ,ES-IS, EIGRP , BGP ...etc. )
some times they call a special router in a special data network scinario
a default gateway ( don't confuse between it and GATEWAY DEVICE )
which means that if the LAYER 3 packet couldn't go to the preintended destination
via any route so it can take the default route via the default gateway ( which of cource is a router )
I hope this answer is satisfactory for you , and good luck
Tamer , Egypt