It sounds like you have 2 networks. A few computers are connected to the WAN while the other computers are connected to the internet.
First you need to put all your computers in the same LAN by connecting them to a layer 3 switch. Then at the switch, you need to configure IP routes. Traffic going to the remote location uses the WAN gateway and default traffic uses the Internet gateway. This setup will require you to change the local gateway IP address to the layer 3 switches IP address so it does all the routing.