The use of the various types of tools (including the Gaming Set) do not rely on a particular skill but instead simply use an ability score appropriate to what you are trying to achieve.
From the first paragraph on p. 154 of the PHB:
For Example, the DM might ask you to make a Dexterity check to carve a fine detail with your woodcarver's tools, or a Strength check to make something out of particularly hard wood.
Having proficiency with a particular set of tools allows you to add your proficiency bonus to the roll in addition to the bonus (or penalty) granted by the ability score that is being used.
As for how the situation would play out, p. 174 of the PHB describes how to handle a contest between two individuals:
Both participants in a contest make ability checks appropriate to their efforts. They apply all appropriate bonuses and penalties, but instead of comparing the total to a DC, they compare the totals of their two checks. The participant with the higher check total wins the contest. That character or monster either succeeds at the action or prevents the other one from succeeding.
If the contest results in a tie, the situation remains the same as it was before the contest.
In your particular case it would depend in part on what game they are playing and what sort of approach they are taking. They could maybe use Charisma to try and bluff their opponent. Or they could try and read their opponent with an Intelligence or Wisdom check. Maybe even Dexterity to try and discreetly slip a winning card into their hand.
Participants do not have to use the same ability check: the NPC could try to bluff the PC with a Charisma check while the PC tries to read the NPC with Intelligence.