Saw this progression C-Em-Gm-Dm in C. Where does the G minor chord exactly come from? I only borrowed from the relative (Am) and the parallel minor (Cm). Thanks
You borrowed it from the parallel minor - C minor. Forgetting the notes which constitute the harmonic minor; those from the descending classic melodic, and also the natural minor will give G, Bb and D, making that Gm chord. That natural minor also goes under the guise of the C Aeolian mode. Notes are - C D Eb F G Ab Bb.
It doesn't have to come from anywhere. It includes two notes from the C scale - G and D - which is why it doesn't sound too 'left field'. That's as much justification as it needs.
Let's be honest, we could take ANY chord, and latch a 'borrowing' excuse onto it. Much more use to think in terms of voice leading, resolution of tensions, patterns etc. than of what scale or mode might have 'lent' it.