I've just started playing the Guitar for couple of months now, learning all of the maj chords and minor chords. I still have a few questions regarding music theory. I came from a background of playing piano, and know a little bit about chord and scales, about what makes a chord. When I am looking at a keyboard or piano key, its easier to grasp the scales and chords as oppose to the guitar and its strings.

My real question is, I'm trying to play a song in the Key of G. The first note is the G chord, and from what I know, the G chord consists of the strings 6,5,1 on frets 3,2,3. While watching a sample of the video, the person is playing a different G Chord, 3rd fret string 6, mute 5th and 3rd fret 1st string. On other notes its also different from the chords, that I've taught myself. I've been reading around a bit, but, how do I know which variation of the chord to play, when theres like 7 different G chords?

In addition, I know that on a keyboard, all of the keys are presented like C D E F G A B C, but on a guitar theres only E A D G B E, how can I apply 1st , 3rd and 5ths on here?

Sorry, music theory is somewhat difficult for me still.
There must be a lot more than 7 ways to play a G chord on guitar. You can play any one you want; it's still the same three notes, it just sounds different.

On a keyboard, everything is laid out in front of you, but on guitar you have to memorize the patterns. If you already know scales, then I suggest you find a diagram of the fretboard that shows all the notes and learn from that.