In a third-conjugation verb, a [g] sound at the end of a present stem generally alternates with a [k] sound, written as ⟨c⟩, before the [t] of the past participle/supine suffix. I believe the phonemic representations of these sounds would usually be given as /g/ and /k/ respectively; if that is correct, this is not a case where "/g/ is written as c" but a case where the phoneme /g/ alternates with the distinct phoneme /k/. (However, whether an apparently neutralizing assimilation results in a change in phonemic identity can be a difficult theoretical question.)
No verb has a past participle/supine form that is typically written with ⟨gt⟩. (I don't know whether there are any examples of ⟨gt⟩ spellings in inscriptions.) Some verbs with present stems ending in [g] have, or may have, a past participle/supine form with something other than ⟨ct⟩ [kt], such as ⟨x⟩ [ks] (figo, fixum) or ⟨s⟩ [s] (dispergo, dispersum).
Here are some examples (vowel length not marked):
This alternation between ⟨g⟩ and ⟨c⟩, and the similar alternation between ⟨b⟩ and ⟨p⟩ in verbs like scribo, scriptum, is presumably the result of regressive voicing assimilation. The period over which this assimilation was actively applied is not certain: it's related to the famous problem of explaining "Lachmann's law", the sound change whereby vowels in certain past participle/supine stems were lengthened (so ago has short a but actum has long a).