I have tried to Google this but not sure how or if it's possible. How can I retrieve my gps data from my android phone from an older date to prove I was not speeding?
Even if you had a continuous stream of GPS fixes from the time you're interested in, you couldn't use it in court to prove you weren't speeding. GPS doesn't record speed, only a sequence of positions, and there's enough error on each position that the speed can be inaccurate - inaccurate enough to look like you're speeding when you're not, or vice-versa.
Location History doesn't record GPS co-ordinates often enough to be any use for this purpose even if it were accurate enough anyway. You can get apps to record this information continuously, but they need to run all the time so they really drain the battery. And of course you can't go back in time to install the app before the date you want.
Go to your location history here: https://www.google.com/maps/timeline.
Keep in mind that the location history might not be complete and also doesn't contain any speed information.