12V Battery Backup Supply for GPRS Tracker
Use two diodes, preferably Schottky diodes in this case due to the low voltage.  The diodes are arranged such that either the car's 12 V line or the small battery can run the GPS, whichever is putting out a higher voltage.

Almost certainly the GPS unit doesn't use 12 V directly and has a power supply inside that makes regulated and filtered lower voltage from the car "12 V".  Most likely, the GPS will still run fine from 9 V.  6 or 7 AA primary cells in series should work well anough to keep the GPS powered up for hours if the car battery is disconnected.  Get batteries with a long shelf life so that they are still ready to provide power after sitting there doing nothing for years.