I beleive the simplest way to do this is to add the both routes with different administrative distance on your core router , that will pass the data to the gateway .
For example ,
ip route 0.0.0.0 0.0.0.0 xxx.xxx.xxx.xxx ======> Primary
ip route 0.0.0.0 0.0.0.0 xxx.xxx.xxx.xxx 10 ======> Secondary
I hope this is what you were looking for .