Gem is a program known as a Siren. She works in the armory underneath the Game Arena along with three other Sirens, outfitting programs with armor for the games.
Gem first encountered Sam Flynn when he was captured and sentenced to fight in the arena. She and the other sirens equipped him with his attire and Identity Disc, before offering limited advice that he simply had to survive in the games.
She later helped Sam find Zuse in the End of Line Club, also telling him that she wished she could have met him under different circumstances.
She later revealed herself to be in league with Castor as an accomplice in his bid for power over the Grid.
And once Castor was taking care off, she had to too and she was left in the Club as it exploded.