The default gateway has to be the address of a gateway on the subnet. A gateway is a router.
Its worth thinking about what the default gateway is for. A simple host (end system) doesn't want to think about routing so it differentiates between other systems on its own subnet and everything else. if the subnet is 192.168.1.0/24 for example, then any address 192.168.1.1 to 192.168.1.254 will be sent locally and everything else will be sent to the default gateway. So the default gateway has to have an address 192.168.1.x and so does our host, or we get a paradox.
The terms "switch" and "router" have got a bit muddled because of L3 switching but gateways are a L3 (IP) thing and the gateway has to be a L3 intermediate system, I call that a router. The router might use L3 switching in its forwarding engine, and it might only have static routes, but its forwarding your packet depending on the packets destination IP address and that makes it a router to me.
If you also have a switch with an IP address, its probably just a managed L2 switch and the IP address is just for switch administation, monitoring, etc.