GPS measures average speed (delta position vs delta time). Radar guns measure instantaneous speed (doppler shift).
GPS also tends to be less accurate in a partial Faraday cage (like a metal vehicle).
Bottom line: don't expect GPS to get you out of your speeding ticket with a tech-savvy judge.