You either have an incorrect gateway address, or you have an incorrect network mask. A gateway is the host address on your network to which traffic is sent when the destination address is on a different network, so the gateway address must be on the same network as your host address.
A host on a LAN sends frames to another host on the LAN directly using the layer-2 address (usually a MAC address). If the destination layer-3 address (usually an IP address) is on a different LAN, then the frames are sent to the gateway layer-2 address. The layer-2 address is obtained using an ARP request, which is a broadcast, so it is confined to the current LAN. If your gateway is on a different LAN, you cannot get its layer-2 address, so you cannot send the frames to the gateway.
Your host will mask both your layer-3 address and the destination layer-3 address, and if the results are equal, the destination is local to the LAN, and the host uses ARP to get the layer-2 address. If the results are not equal, the host uses ARP to get the layer-2 address of the gateway. A host cannot get the layer-2 address of a gateway on a different LAN.
I suspect your error stems from the fact that you are confusing the WAN and LAN addresses. You should probably use DHCP from the WAN to assign the WAN addressing for your router. Your local DHCP server is for your LAN, not the WAN, and it needs to assign your router's LAN address as the gateway to your hosts. Your LAN gateway needs to be in the same network as you have assigned to your LAN router.