I'm mostly self-taught, so I don't know much in the way of theory beyond the basics. I have heard of G sharp Major a few times. I believe a scale in the key goes as such: G♯, A♯, B♯, C♯, D♯, E♯, Fx, G♯. Is this key real (as in, has it ever been used in a notable piece)? Or, is it a "theoretical" thing? If it is real, does it have any significant relations to G major?
I'm not sure why you'd have any reason to question why it's real ... it's not really related to G Major though, no more than C# major is related to C Major. It's enharmonically equivalent to A♭ major, just like C# Major = D♭ Major or F# Major = G♭ Major.
As for pieces involving it, Wikipedia mentions some. In general, keys with double-sharps aren't used very commonly because their equivalents are easier to play. With just intonation, however, G# is not actually the same note as A♭, nor are the keys the same. For more information on that see my answer here and the answers on the question it links to.
The larger question is why any composer would use a certain key signature rather than its enharmonic equivalent. For instance the choral music composer John Rutter is known for notating songs in C♭ major (with seven flats) rather than in B major (with five sharps). In the equal-tempered system, C♭ major and B major are the same key.
Despite the fact that this frustrates the heck out of piano accompanists, there is actually a good reason for it; C♭ major is the preferred notation for a harp player, due to the way that the harp is tuned and the pedals on the harp are used to transpose pitches. Rutter has written several pieces that may be performed by either harp or piano.
So in this example, the choice of key signature can be influenced by the instrument that the composer is primarily writing for.
Realize first that keys can be, and very often are, "temporary" within a piece. That is, the tonality may modulate to a new key without changing key signatures. Accidentals are used to indicate on notes that are in the tonality of that section.
With that in mind, I could imagine that G♯ Major would be used in a number of works, but not as a key signature. Try looking for works that might modulate to G♯ Major. c♯ minor could certainly do so, for instance, if the more "traditional" approach of modulating to the relative major were replaced by modulating to the dominant. Sometimes, as in Chopin op. 10, no. 4, the composer will choose to write in A♭ Major instead for notational convenience. Compositions in C♯ Major are fewer, but you may be even more likely to find the modulation in question in such a work.
These unusual keys are more likely with transposing instruments. For example, if the non-transposing instruments are playing in F# major then the Bb instruments will have to play in G# major. Some instruments are pitched in Eb so if the non-transposing instruments are playing in B major (not so unusual) then the Eb instruments will have to play in G# major.
If the piece is intended for these instruments then these keys are unlikely. However, if you transpose on sight with these instruments then you need to be comfortable with some quite wild keys.
Addition suggested by phoog's comment. G# major is so crazy that it would be more practical to rewrite it as Ab major provided that you regard that as the same. However, this will be a surprising key for a saxophone player. Nonetheless, if you are playing music in concert pitch by sight then G# might be slightly better as transposing up a major 6th will be familiar to many Eb instrument players (I have done it many times) but transposing up a diminished 7th will be much less familiar (I have never done it). Fortunately, I have not been faced with a concert pitch piece in B major while playing the alto or baritone sax.
In 12-EDO and equal temperaments that are multiples of 12, G♯ Major is redundant since G♯ and A♭ are enharmonically equivalent. You only ever hit these "theoretical" keys briefly as part of chord progressions or cadences.
However, if you go into other tunings, like 19-EDO (1/3-comma meantone), 31-EDO (1/4-comma meantone), 43-EDO (1/5-comma meantone), or 53-EDO (Pythagorean tuning), G♯ Major is a real thing, fully separate from A♭ major, since G♯ and A♭ are different notes.
you can look at the "G# Maj." key in a couple of different ways, (1) as a disregarded, feared and denounced part of music and music theory, very much like the dreaded locrian and diminished modes - to be avoided at all cost. It's a theoretical problem much like arguing if there is such a key as B#/Cb Maj., E#/Fb Maj., in comparison to G# which is not at the same time enharmonically a whole tone note such as B#/Cb, E#/Fb are. (2) you can simply view the G# Maj. scale as such and follow the major scale formula (W-W-H-W-W-W-H) and substitute the double F# for it's whole tone name of G for convenience sake, so you would have 6 sharps instead of 6 + a double (actually a double sharp would count as 2, so you have 8 sharps). It doesn't matter how many sharps or flats a key has or if there is a theoretical complication, if you follow the simple formula it all works out automatically. (3) to make it even easier,(on guitar) it's both the 1st G major finger pattern and also the 3rd C Maj. finger pattern moved to the G#/Ab position- all major and natural minor keys are simply the C-major finger pattern transposed to a different tonic note. Of course this would also depend on if you have a chord progression or scale that is either ascending or descending in pitch, if the Maj.-chord progression/scale in this position descends it should be called an Ab Maj., but if it ascends it should be called a G# Maj. - as flat and sharp also show the direction of movement (higher to lower in pitch and vice-versa) for any and every musical structure.