I am passionate about music theory (and have a minor in it as well).
The C minor just functions as the minor four chord of the key of G. Other threads have mentioned this chord, someone called it the "christmas chord" because it is popular in Christmas songs. In general, resolution from minor to major "sounds like the sun coming out" as Jacob Collier puts it. (he is excellent at communicating musical concepts in layman terms).
In more detail, the moving from C major to C minor back to G gives you a double dose of tension and release. For starters, you have the standard harmonic feeling of resolution by moving from the four chord to the one chord (C to G). This is known as a plagal cadence, some call it the "amen cadence" due to its use in church over the centuries.
But WAIT, there's MORE!
By inserting the C minor between the C major and G major, you get the added benefit of the passing tone movement from E, to Eb to D (the third of C major, the third of C minor, then the fifth of G major, the home key or tonic.
A minor four to one resolution is a wonderful sound. Try taking it a step further... add one more chord for more movement:
G to C, then Cminor, then Ab major 7, then G. You go from adding one passing tone (or note 'not in the original key') to two passing tones, for even more tension and then happy sunshine rising at the end.
Enjoy!
paulie