The slang bet appears to come from the everyday word bet, a wager or to risk something of value. By the 1850s, we were saying You bet! as an affirmative exclamation with the sense of Indeed! This expression has the underlying notion of You can bet that it is so or That's a bet.
In this context, "You bet" is a casual and friendly way of acknowledging thanks, and it conveys a similar message to "You're welcome" in that it acknowledges the gratitude expressed.