It's a standard E5, F#5, G5 progression, standard for E minor riffs, relative to G major.
I would say it's in E minor, just on the justification that you are starting on the E, and ending on the E. I will teach you below
It goes like this:
Major Scales!
WWHWWWH - These are the tonal steps between notes. So if we were to start on say, G major, since that's your example, we start on G and count.
G, whole step up to A, whole step up to B, half step to C, whole step to D, whole step to E, whole step to F#, half back to our G
So the scale for G major is:
I, ii, iii, IV, V, vi, vii*, I
G, A, B, C, D, E, F#, G
Where the G, C, and D (I, IV, V respectively) are major, and the rest are minor, with F# being diminished. This is your standard MAJOR scale. To find the relative minor in this scale, we take the 6th (vi) chord in our scale, which happens to be E minor.
This is called the Relative Minor of G major. This scale has the same exact notes as the G major scale, except we start on the E, so we have a more depressing sound.
Usually you can identify the key you play in by looking at the first chord of a progression, and seeing what it resolves to. In this case, it starts on an E, and ends on an E, so I say it's in E minor.