Gary is the anime counterpart of the game character Blue. Like Blue, he is grandson of Professor Oak and a trainer from Pallet Town who begins his Pokemon journey as rival to the main character (in this case, Ash Ketchum). He also shares Blue's arrogant personality. However, Gary's character deviates from Blue because he eventually quits being a trainer and decides to become a Pokémon researcher like his grandfather, mellowing out and becoming less of a rival and more of a friendly ally to Ash.
Gary's Japanese name, Shigeru, is an homage to Shigeru Miyamoto, whom Pokémon creator Satoshi Tajiri came to admire as a mentor.