Lewis & Short

G, g, indecl. n. or (on account of littera) f., had originally no place in the Latin alphabet: both the sharp and the flat guttural mutes, our k and g sounds, being represented by C; hence on the Columna Rostrata LECIONES, MACISTRATOS, EXFOCIONT, (pu)CNANDOD, PVCN(ad), CARTACINIENSIS, for legiones, etc.; hence, too, the archaic form ACETARE for agitare (v. Paul. ex Fest. p. 23 Müll. N. cr.), and the still common abbreviation of the names Gaius and Gneus in C and Cn.
At a later period (acc. to Plut. Qu. Rom. p. 277 D and 278 E, by means of a freedman of Spurius Carvilius Ruga, about the beginning of the second Punic war) a slight graphic alteration was made in the C, which introduced into the Roman orthography the letter G (on the old monuments C); thus we have in the S. C. de Bacchanal.: MAGISTER, MAGISTRATVM, FIGIER, GNOSCIER, AGRO; on the other hand, the orthography GNAIVOD PATRE PROGNATVS on the first Epitaph of the Scipios, which dates before that time, indicates either incorrectness in the copying or a later erection of the monument. When Greek words are written in Latin letters and vice versa, G always corresponds to Γ. Its sound was always hard, like Engl. g in gate, at least until the sixth century A. D.As an initial, g, in pure Latin words, enters into consonantal combination only with l and r; and therefore in words which, from their etymology, had the combination gn, the g was rejected in the classical period, and thus arose the class. forms nascor, natus, nosco, novi, notus, narus, navus, from the original gnascor, gnatus, gnosco, etc. (cf. the English gnaw, gnat, gnarr, etc., where the g has become silent); whereas in compounds the g again is often retained: cognatus, cognosco, ignarus, ignavus.
An initial g is dropped in lac (kindred to GALACT, γάλα), likewise in anser (kindred to Germ. Gans; Sanscr. hansa; Greek χήν).As a medial, g combines with l, m, n, r, although it is sometimes elided before m in the course of formation; so in examen for exagmen from agmen; in contamino for contagmino (from con-TAG, tango). Before s the soft sound of g passes into the hard sound of c, and becomes blended with the s into x (v. the letter X); though sometimes the g (or c) is elided altogether, as in mulsi from mulgeo, indulsi from indulgeo; cf.: sparsus, mersus, tersus, etc. So too before t, as indultum from indulgeo. The medial g is often dropped between two vowels, and compensated for by lengthening the preced. vowel: māior from măgior, pulēium from pulēgium, āio from ăgio (root AG, Sanscr. ah, to say; cf. nego). Likewise the medial g is dropped in lēvis for legvis, Sanscr. laghn, fava for fagva, fruor for frugvor, flamma for flagma, stimulus for stigmulus, examen for exagmen; jumentum, from root jug-: sumen from sug-; cf.: umor, flamen, etc.As a final, g was only paragogic, acc. to Quint. 1, 7, 13, in the obsolete VESPERVG (for vesperu, analogous with noctu; v. Spald. ad loc.).Etymologically, g corresponds to an original Indo-European g or gh, or is weakened from c, k. Thus it stands where in Greek we have:

        1. (α) γ, as ago, ἄγω; ager, ἀγρός; argentum, ἄργυρος; genus, γένος; fulgeo, φλέγω, and so very commonly;
        2. (β) χ (usually before r, or in the middle of a word): ango, ἄγχω; rigo, βρέχω; gratus, χαίρω, etc.;
        3. (γ) κ: viginti, εἴκοσι; gubernator, κυβερνήτης; gummi, κόμμι, etc.
          By assimilation, g was produced from b and d in oggero, suggero, aggero, etc., from obgero, sub-gero, ad-gero, etc.As an abbreviation, G denotes Galliarum, Gallica, gemina, Germania, genius, etc.; and sometimes Gaius (instead of the usual C); v. Inscr. Orell. 467; 1660; 4680: G.P.R.F. genio populi Romani feliciter, Inscr. Orell. 4957; v. Corss. Ausspr. 1, 76 sqq.; Roby, Lat. Gr. 1, 38 sqq.