TheIt starts off correct, but all devices along the path an IP packet takes are allactually the samesame kind of thing,1 and all of them can be called either "gateways"'gateways' or "routers"'routers'.
That is, but"the gateway" refers to a router just like the next one it might be slightly less confusingpasses the packet to call them "routers", but the emphasis is on "the gateway" as in short for "default gateway/router for this particular sender".
1 [This is deliberately not counting devices that are invisible to IP, e.g. switches or bridges or modems, because an IP packet doesn't interact with them but travels straight through them, so they're irrelevant to the topic.]