A GPS is dead-nuts on. Even with the correct 31 tooth speedo gear as you have installed, your speedometer can be very slightly off just due to slight variances in actual tire size diameters.
I changed out the existing speedo gear with 34 teeth for one with 32 teeth. This has corrected my 5 miles per hour error at 45 MPH with the 33 inch tires (32" actual size) and 3.73 gears.