The following is from the Windows 2000 Resource Kit. It explains how windows detects a gateway that doesn't work anymore, and how it will use the new gateway:
Dead Gateway Detection
Dead gateway detection is used by TCP traffic to detect the failure of the default gateway and to make an adjustment to the IP routing table to use another default gateway. Windows 2000 TCP/IP uses the triggered reselection method described in RFC 816, with slight modifications.
When any TCP connection that is routed through the default gateway has attempted to send a TCP packet to the destination a number of times equal to one-half of the value of the registry entry TcpMaxDataRetransmissions (default value of 5) without receiving a response, the forwarding IP address for the Destination IP Address is changed to use the next default gateway in the list. When 25 percent of the TCP connections have moved to the next default gateway, TCP informs IP to update the default route for the IP address of the next default gateway, the one that the changed connections are now using.
For example, assume that for a host:
There are TCP connections to 11 different IP addresses that are routed through the default gateway.
The host has multiple default gateways configured.
TcpMaxDataRetransmissions is set at the default value of 5.
When the default gateway fails, the following process switches the default gateway to the next one in the list:
Continuied.....