I work for verizon and have seen a lot of different issues, but as far as I can tell from the battery being a gray icon with an exclamation mark in it is from a loose connection. I have had an eris and an incredible 2 with this issue and both times the phones had a little damage from being dropped. When I compared them to a new one we had in the store, the battery was noticeably looser. I found that when you made a call, got online, or opened a game it would go from a green battery to the gray one with an exclamation mark. It seems to happen when the phone starts draining or receiving a larger amount of power...and it would come on the majority of the time when you charged it. The phone had no other issues other than randomly shutting off and not restarting itself which can be from a loose connection too. (all batteries should have a small amount of movement to allow the battery to be taken out and put in...but these had too much)
Both people didn't have the issue with the percentage of the battery fluctuating so much. So if your battery is fluctuating like that then the earlier suggestions, from EarlyMon and The Frigz, would help. If it is just the icon and shutting off then check the connection and see if the battery is loose and compare to another one of the same phone if you can.
EarlyMon: If you feel that that isn't correct then I would appreciate a suggestion.