I'm fairly certain Unown G is completely undiscardable, or something (I remember hearing it somewhere). It blocks all effects of attacks, and the discarding effect of Pulse Barrier is an effect of an attack...
unown g blocks additional effects down TO the pokemon it is attached to so therefore yes it would not be discarded. the invincibility is an effect on electivire. but here's the catch: the following turn the opponent would still have a tool in play (unown g) which means electivire level x would get to attack for 50 +invincibility until the pokemon with unown g attached is no longer in play which might be many, many turns.
in short, electivire LOVES unown g more than any other tool.