It implies that someone was confident in their statement, but now needs to acknowledge their mistake.
Here's an example:
* "I bet you can't run a mile in under 8 minutes."
* "Oh yeah? Watch me!" (runs a mile in 7 minutes)
* "Well, I guess you have to eat your words now!"
The image behind the phrase is that the person is literally "eating" their previous words, as they are no longer valid.