Gmaj7 is made of these notes: G (root), B (major third), D (fifth), F# (major seventh).
With this shape the strings sound like this, from the g string to the D string: G, D, G, B, F#.
A major seventh chord sounds dreamy and soft. It can replace the plain major chord, especially at the start or end of a song.
Gmaj7 belongs to these major keys: G major (degree I), D major (degree IV).