I had this issue, and it caused no end of trouble. I'm currently without my Moto G, as according to the Phones4U Repairs Tracker, it's "Within repair process" and I left it with P4U 11 days ago.
I might have a different cause to you guys, because it looks like there is/was a software issue that causes this behaviour too. And this is going to sound stupid, and if I hadn't seen it myself, I wouldn't have believed it. But my issue is the spring-loaded SIM card slot has too much spring. It slowly pushes the bloomin' SIM card out slightly after a random length of time.
Initially I thought it was something I'd done, despite getting a SIM free one and only doing official updates. So I factory restored the phone, and that didn't help. So then I couldn't believe it was the phone, I figured it was the SIM card. So I swapped SIMs. Same issue. Then it happened to do it before I put the rear cover back on, and I could see the slight difference.
It happens after a random length of time, but because it doesn't come all the way out, it makes an intermittent connection. I could have fixed it with a bit of tape, but it was under warranty. I'm currently using a mate's LG Optimus 4X HD P880 while I await the return of my Moto. Bad times.
Thankfully I managed to demonstrate this to the lady at the desk in P4U who added it to the repair documentation, I got lucky because sometimes it didn't do it for ages after I'd reinserted the SIM. Otherwise Moto could have looked at it, not seen the problem actually occur in front of them (as it happens after a random length of time) and just sent it back with NFF. I've still got my fingers crossed that they fix it and this resolves the issue though.