Indeed, DC comics ran with this idea for a movie-era encounter between Kirk and Gary, with plot elements that seemed to lead into the political situation with the Klingons in TUC. Gary is an "intervention" agent working for a group called the Aegis, who can travel through time as others do through space. His mission, and that of other agents, is to ensure that the histories of their planets are not altered by outside influences and that potentially lethal conflicts don't destroy them. But some interventions fail, and this led to a group of agents going rogue and trying to destroy the Aegis.
Indeed, and Howard Weinstein's creation of the Aegis has provided fodder for later novelists, notably Greg in his Gary Seven novels Assignment: Eternity
and The Eugenics Wars
Books 1 & 2, yours truly in Department of Temporal Investigations: Watching the Clock
, and most recently Dayton Ward in the just-released From History's Shadow
. In my case, I incorporated the Aegis as one of the combatants in the Temporal Cold War (since the way Howie portrayed them in the comics fit perfectly with the TCW even though he came up with it ten years beforehand), and Dayton builds on that in FHS.
John Byrne's IDW comics portray Gary's agency differently -- they're not called the Aegis there -- but his stories do depict Gary using time travel once or twice.