Having been left out of the recent RBS 6 Nations campaign, critics have been suggesting that the 35-year-old's international career has finally come to an end.
But Gatland has insisted that is not the case, stating that Williams could still feature in this year's World Cup.
"Martyn is not out of the equation," Gatland told the South Wales Echo.
"That is a debate we have to have and the Baa-Baas match is going to be like a trial game for him.
"It will be fantastic to see Martyn and Sam Warburton go head to head in that game."
Williams is currently just two appearances shy of reaching a century of caps for Wales some 14-and-a-half years after making his international bow, ironically against the Babaas.
And while everyone in the game would love to see one of Rugby Union's most affable figures reach the magical milestone, Gatland says the man himself would only want to be picked on merit.
"I think the last thing Martyn wants is for us to say 'here are your two caps to get you to 100'," added Gatland.
"If he does get to 100 caps I am sure he will want to have earned his 100 caps for Wales."
An impressive performance against rival openside Sam Warburton next month could still see Williams hit 100 Test caps prior to the World Cup in New Zealand.
Wales face England (twice) and Argentina in warm-up games this August, meaning Williams could yet become a centurion even if he fails to make the cut for the global gathering.