The solution may sound strange but it worked for me. Hold the remote and smack it face up on the palm of your hand (the A button to hit your palm). Give it a good smack but don't go crazy.
I had the same problem until I read this somewhere that it was what Nintendo tech support actually will tell you to do when you call them. I thought this was a joke but I had nothing to lose. Surprisingly, it worked after 1 good smack but I gave it another just in case :)
mario, January 2008