There is some overlap, but that doesn't mean your brain isn't melty.
In essence, yes, a SOHO gateway with multiple LAN Ethernet ports is also a switch. The switching functionality occurs when computer A, connected to a first LAN port sends data to computer B, also connected to a LAN port. The routing function of the device is not required for this to happen.
Conversely, an Apple AirPort Express, which has only one Ethernet port, does not act as a switch when used as a gateway, but does act as a router. To add to the confusion, it's also a bridge (bridging the wireless and wired networks) and a hub (all wireless devices see all wireless traffic, regardless of destination).