Lets keep it simple and forget the fact its tuned down half a step.
The song is a II IV V progression. with the II chord acting as a kind of tritone substitution / secondary dominant chords. The song, however, is E Dorain, hence the Em7#9 chord is the prominent chord. E Dorain is especially prominent in the solo and he also uses the tritone as a passing note in the solo. Blues often used Dorain modes to solo, its a very blues mode with more of a Major feel than the straight up minor blues scale.
To expand on the beauty of music and how it flows in and out of itself the Em7#9 is simply a common tritone substitution or secondary dominant chord, something extremely common to Jazz and often used to switch keys. The tritone of D maj is A flat. A tritone wants to resolve either up or down the scale tone chords so either to the IV, V of a Key, in this case G major. From here Jazz musicans could then use G major as the root, effectively, switching down the circle of fifths, or the A if resolved to the V... or carry on in the same key, which is what Jimi does. This is what gives the tune such a bizarre feel with that Em7#9 chord acting as the prominent chord yet having such an un "root chord" feeling. - yet when the G Maj and A Maj hit it feels so resolved yet a tiny bit unfinished like the more proper i, IV V progression
This is why once Jimi has played the Em7#9 he plays the G maj then A Maj and it sounds so reliving to the ear. If it were in the Key of E minor / G Maj as most think then why is there an A Maj chord right? (this confused me for a long time before i learnt theory and jazz harmony and was told by a teacher to always try and find the common ionian or major scale of the piece of music) So the way i interpret is: D Maj, playing from the dorian mode E, with the G maj and A maj as the IV and V chords respectively.
The same tritone note is used during his solo, which sounds so bizare yet in key - this is the beauty of jazz and tritone substitutions