Look above and see that the A note is indeed the sixth note. The sixth note is also the Aeolian mode in every key. The sixth note also represents the minor chord. So in the key of G, the E would be the relative minor. E is the 6th note in the key of G major.
E is also a minor chord.
E also represents the Aeolian mode in the key of G major. I believe a good way to switch keys, is to know the Ionian and Aeolian for each key. This is NOT the complete answer, but it is a good starting point. Because certain notes sound better together than others. For example if you where playing in the key of C major and the G came up, you could switch to the key of G major.