There are lots of posts and videos online telling you to tweak various contacts, but they're all wrong! I've finally fixed this after months of messing.
1. The GPS antenna is at the top-right, looking from the front of the phone.
2. The contact pad is a tiny piece of metal gauze at the very top right of the back.
3. There is only one contact on the main board that contacts this pad (easy to see which it is).
I think the reason people say other things have worked is that simply opening and re-assembling the phone will re-seat the contact, improving performance for a while.
Real problem: the contact gauze connects to the antenna at the top, the contact pin presses on it near its bottom edge. There should be a tiny rubber pad under the lower part of the gauze. This was missing on mine, so the spring contact never made good pressure on the gauze, and over time wore the gauze away. I only discovered this after buying a broken G5 on eBay and comparing. I swapped phone backs to get it working.
I also proved this is the contact by re-assembling with a sliver of paper on the gauze to prevent contact - no GPS signal.
The missing rubber pad must have been a manufacturing error, I don't know if it affected a whole batch. Check out this area in the back of your phone, you may be able to see why there's a problem.
After more messing, it seems I was still slightly wrong myself!
The diagram belo shows where the antennae are on the back of the G5. This is viewed from the back, where the GPS antenna is area 4. Looking from the front (i.e. looking at the back from the inside) it's at the top right.
Here's a photo of this area from the inside of the G5 back. There are two contacts in this area, circled in green and red.
I originally thought the antenna was the green one, as it's in the right location, and disrupting it seemed to stop GPS. However, further tests on another phone have proved to me that the main antenna contact is the red one, which connects to a rectangular pad on the motherboard. The pad is circled in red in this photo:
I suspect the green contact is a ground connection, as are other similar contacts around the back. Bad grounding can be expected to degrade the antenna efficiency, so the ground contacts are important too. I think this is what I was seeing initially.
So my conclusion is that good GPS reception depends on both a good ground connection in the corner, and a good connection to the antenna pad marked in red. About the only thing you can do to improve the pad's contact is to gently rub both surfaces to remove any oxidation. The tip of a spudger is probably the best tool.
But also remember that just opening and re-assembling the phone re-seats the contacts, which usually improves things anyway, at least in the short term. This makes it very hard to work out if anything you did inside the phone was actually relevant to the GPS!