This could be a "jiggling the usb cable makes it work" situation. Take a look in the micro usb port on the phone. Inside you will see a tiny "card" with multiple contacts. Do any of the contacts appear to be bent? If so you could (after removing the battery) use a tiny screwdriver to try and straighten them or you could replace the mainboard (if you want to repair the phone) or you could try to negotiate an upgrade to get a new phone. If you dont see any damage to the contacts, it's probably the battery reaching the end of its life span. One way to check for this (but not all end of life batteries will exhibit this symptom) is to remove your battery and lay it down on a table. Now tap the corners lightly. Does the battery rock at all? Is it visibly swollen? If so, it's definitely time to replace the battery. One alternative (for both situations) is to get an external charger and a spare battery or two and charge them outside the phone.
Here is a link to the one I have. http://www.amazon.com/gp/product/B003XOUM12
I keep one in the charger and one in the phone and rotate as needed.
It comes with two batteries and a charger. The batteries are 1900mAh which is more than the stock battery (which is 1300mAh) so I guess you could call them "extended life" batteries. Note that you will have to peel the stickers off the batteries otherwise they wont fit properly.
Here is a link to a video of how to install and use these batteries without having to modify your phone.
I hope this helps! Good luck to you.
I had this same problem crop up yesterday afternoon. I took my phone off the charger in the morning, and it was fine - I went to plug it in to my car about 6 or 7 hours later and it didn't recognize it at all. I've tried different cables, different chargers, jiggling the USB cable, restarting the phone, pulling the battery, and even different batteries (my wife also has a G2), and NOTHING has fixed it.
The Tmobile store is of little help, since they don't carry the G2 anymore. I've also looked at the physical USB port and nothing appears to be broken/dirty that would explain it not working at all.
Any help, aside from "get a battery charger and an extra battery" (which I'm doing) would be great.
When you plug the phone into your computer, does the phone realize that it has been plugged in? What I mean is, even if the phone doesn't charge, are you given the "Turn on USB Storage" option? If so, then you know the hardware connection (the usb/DcIn port soldered to the mainboard) is fine. The next troubleshooting step is to clear the cache. Failing that, try a master reset. I really don't think the problem is software related though. Micro USB ports are notorious for failing because they are so stiff. Even the tiniest of flaws in the solder connection become exacerbated over time. This ultimately results in a complete failure of the conneciton between the port and the mainboard. This leaves you with four options.
1. Repair the damaged connection (not really an option for the home fix-it kind of person. Most people don't have the tools and materials to affect this type of repair.)
2. Replace the main board. There are lots of places online where these can be picked up. repairsuniverse.com is who I use as they only stock OEM parts.
3. External battery/charger and seperate micro SD card reader - so you can add/remove files from your phone. (I noted that you said you are already working on this.)
4. Try to negotiate a replacement/upgrade from T-Mobile. (If you are still under warranty, this is your best bet.)
Good luck, I hope this helps.
Thanks for your help, mikewithe. I've got an extra battery and charger on the way today, but I think I'll try to talk to T-mobile/Asurion to see what my options are. Since the G2 isn't being sold anymore, I don't know if I would get a refurbished one (which I've heard quite a few horror stories about), or if there is a "comparable" phone that I would get instead. I'd definitely trade it straight up for a Galaxy Nexus - but I don't think that option will present itself. :-P
Thanks again for your help!