For the E7 sharp 9 chord, I don't understand how it has a G in it.
The ninth note on the E scale is F, so that would be F sharp. How is it G?
An E9 would have an F♯ in it. An E7♯9 doesn't have a G in it, it has an F𝄪 (double sharp) rather than a G.
While those are enharmonic equivalents, they are very different in connotation. When double sharps are introduced, there are some lines of thought where it's better to write an enharmonic equivalent that may be less accurate that go into double sharps or flats and you may have encountered it in this scenario.
E7#9 should have (E, G#, B, D, F##), in general (1, 3, 5, b7, #9). It has an F##, or Fx. Many music students equate enharmonic tones but the fact is this is not always correct. It works in Equal Tempered Tuning but not all tuning systems. A proper music text should not equate these. The #9 is not the same thing as a b3. My question to you would be where are you getting this info? If you have a book or sheet music that lists it can you upload a pic of it so we can see. It's possible that you just got a resource with a typo in it.
Thanks to b3ko for correcting my mistake.
This has already been answered correctly twice, so I will instead try to add a new perspective. Yes it is technically inaccurate to perceive the #9 as a minor 3rd scale degree, and so F## or Fx is how I teach it to my students. However, the G is practical. Many accomplished Blues and Jazz players will spell it [as a G] to ease real-time improvisation, harmonization, or even when songwriting to understand potential modulations and voice leading.
G is also the relative major scale to E minor, as you may already know. For this reason, it is not uncommon to see a G chord after an E7#9 chord in Rock and Blues genres.
Often you'll see this chord described as "the Hendrix chord" (or some other modern artist attribution). Perhaps the most famous usage example is Hendrix's "Purple Haze" ... in which the chord progression is E7#9, G, A (not E, Fx, A).
Know the correct way, but don't close your mind to other ways.
Edited to add: One more thing! The altered chord (the one we're discussing) can also be spelled with a b9 (flat nine). Sometimes both are indicated, sometimes neither are indicated (it will simply say E ALT). But regardless which notes the chord symbol calls for, it is totally fine to play both when improvising over that chord. So feel free to experiment with F natural over that E7#9 if you like.
As the other answers point out, that 'G' is in fact Fx. Given the fact that the chord is called E7♯9, and the 9th note in E is F♯, then that note gets sharpened again. thus F♯♯, or Fx.
I think the misnaming comes from the fact that m3 is used a lot in Blues (and jazz), and that actually is called 'G'. Since in 12tet it sounds exactly the same as Fx, that note ends up being named G, partially out of convenience, partly ignorance. I used to consider it E7 with a m3, (wrongly), and I'm sure some guitarists regard it the same. There are also sites out there that provide us with spurious information, which tend to re-inforce certain inaccuracies, and those don't help.
By now you should be convinced that the #9 in a chord with root E is an F## (or Fx), which is enharmonically equivalent to a G.
However, I think the real question is whether that chord should be called E7(#9) - as is very common, at least in the English speaking part of the world -, or if it should be called E7(b10), which is also used, and definitely not only by people who don't understand the issue. If you accept the b10 notation, then that note is indeed a G.
I personally think it's completely pointless to discuss which of the two is more correct. You can find arguments for both. I always use #9 (because everybody does, and for me it's about communicating chord symbols efficiently), but if you ask me what I hear, I'd probably say that I hear a b10. One important argument for me is that that note virtually never resolves upwards. More arguments (which are not mine) can be found in this answer to a very related question.