Using the phrase often implies that an apology or retraction is expected after a mistaken statement. You said it would never work, but it did. Time to eat your words.
Pro Tip 2/3
Casual Tone
The expression is informal and usually used among friends or in casual conversations, not in formal settings. If I'm right, you'll be eating your words at our next game night!
Pro Tip 3/3
Possible Teasing
It can be used playfully among friends to tease someone about a wrong prediction or opinion. Looks like you'll eat your words; my underdog team just won!