Gotta agree with Tulpa that shmup is the overall category. Space Invaders is widely regarded as the first shmup. Galaxian and Galaga are certainly shmups and though it is merely the background which scrolls, these are the prototypes of the scrolling shmup subgenre at least on a rudimentary level. Later more complex games introduce the player to backround interaction via bombing enemies (Xevious) and scrolling forground enemies and obstacles, of course.
And speaking of prototypical shmups, I'd say that honor goes to Spacewar! Which is more a precursor to the Asteroids style multi-directional shmup. Another sub-genre pioneered by the original.
Now moving on to my personal favorite shmup, Tempest. Which introduces us to yet another subgenre, the tube shooters. Really it's just Tempest and Gyruss but they pave the way to the 3D rail shmup genre including Space Harrier and Star Fox. And yes, Gyruss should be on the list of NES shmups.