>>76946266
It's actually not the answer...because it's backwards. What >>76946250 and >>76946152 aren't getting into is that Yu-Gi-Oh! isn't a case of a game having an anime based on it, it's a case of an anime getting a game based on it.
The manga wasn't originally about card games, it was about all kinds of games. Gambling, craps, all kinds of stuff. Then one of the arcs briefly focused on "Duel Monsters," a very thinly-disguised homage to Magic that was the subject of a game between Yugi and Kaiba. And then that arc ended and we moved on to the D&D game with Bakura.
Except the fans LOVED the Duel Monsters game. It was insanely popular, and pretty soon Kazuki just sort of resigned himself to it and went with the Duelist Kingdom arc. Remember how random the Dungeon Dice Monsters thing was? That was Kazuki trying to go back to a broader portfolio of games, but people didn't like it as much so he went ahead with Battle City because apparently all anyone cared about was card games.
The anime that most people know was the second one. The first anime actually does the whole "other games" thing, with Tamogachis and whatever the hell else. But, by the time it was time for a second attempt at an anime, they knew what people wanted, and they cut all that crap and got straight to the card games.
The Yu-Gi-Oh! card game first came out somewhere between the two anime adaptations, if I recall correctly. So, while one could argue that the second series is a case of the card game having an anime, the card game only existed because the media property was ALREADY popular enough that people wanted the card game to exist. And, don't forget, it was originally based on Magic and just called "Duel Monsters" because Kazuki didn't want the legal baggage of calling the card game in a one-off arc "Magic: the Gathering". So, really, Yu-Gi-Oh!'s success is due to the fact that Magic got an anime. Funny how that works.