a lot of things happened:
-expensive fuel; probably the biggest immediate reason, although Avgas hasn't risen relatively that much beyond other other fuels. It is a boutique product and requires separate handling, etc. so the price, ugly as it may be, is not unreasonable. Let's see what the 'greenies' law suit to end leaded avgas does though.
-available aircraft; the fleet is aging and good older and especially new aircraft are expensive. Also, aside from the new glass panel birds, how exciting are steam gauges and flimsy plastic interior panels to a target population used to driving 5 series.
-aging/decreasing pilot population; we are just not attracting enough new pilots for a lot of reasons. Cost is a huge reason, but some are cultural. What kid wants to fly? Some do, but not many. ~40 years ago i was 5 flying (trying) a Cox Stuka w/ my Dad, kids played w/ gliders, the space program was in full swing, nightly TV news had Phantoms & Skyhawks doing what they were built to do (keeping apolitical here)...kids wanted to fly. Now they play video games which are pretty darn entertaining and a lot easier than earning a PPL.
As far as attracting adults, tough also, look at what you have to compete against for their tome and money. Also, the target demographic, professionals, small business owners, etc. probably work more hours than 30-40 years ago.
General Aviation flying will continue, but short of a marketing miracle or another dot.com boom it will be more of a niche hobby than it is now. Piper will sell its 100 planes a year, Beechcraft (Bonanza
), Cirrus and Cessna more and the expirimental and Warbird folks will remain active, but the heydays are behind us.