There were a lot of contributing factors to the demise of Atari.
As others have stated poor management had a lot to do with it. Also, as has been stated a lot of crappy games had a lot to do with it well. I wouldn't attribute to one such as Pac-Man or ET. I would say it was a culmination of bad games. Those ones simply stand out more some others.
Actually, the NES was released in the United States in October 1985 while the 7800 was released in January of 1986.