Intel has been modifying the Pentium 3 for the last 15+ years. Brand new i7? Just 4 modified (heavily modified) Pentium 3 cores. Intel's architecture is very mature and refined. The Atoms are different, but nobody cares about those.
AMD, on the other hand, largely started from scratch with Bulldozer. There's a lot more room for refining left to be done. Piledriver was a bigger performance increase than Intel has pushed out in several years, and Steamroller will probably be the same, which, by the looks of Haswell so far, could put AMD right back in the running.
Of course, if you look at the Linux community, where compiling programs from source, usually with compiler flags to tell which CPU family to optimize for, the 8350 is already much faster (compared to Intel's lineup) than it is on Windows. It sounds like conspiracy garbage or fanboyism to say that Intel is only ahead because programs are by default optimized for Intel, but it's true, to a degree. Not to say it's the ONLY reason they're ahead right now, but it definitely helps.
AMD will be in both of the important consoles by the end of the year for both CPU and graphics. Game developers will 1) learn to make better use of 6 or 8 cores or however many are available for the actual games to use, and 2) learn all sorts of low-level hackery to get more speed out of AMD CPUs, which will, to some extent, translate to the desktop world.
There's also HSA, which is basically a synergistic performance and efficiency boost that will be coming to AMD products in the next year or so. It would essentially allow CPU and GPU to function as seemless whole, even sharing memory space and such. There's nothing stopping Intel and/or Nvidia from also implementing HSA (AMD is not a fan of closed, proprietary systems), but they won't, because it is 100% AMD's ballgame and they will get beaten at it. Their strategy seems to involve just hoping it doesn't catch on.
What AMD needs to do is properly execute on the awesome circumstances they have lined up for the next couple of years while also not running dry out of money, but properly executing is not exactly their strong area.
As for what Intel needs to do: drop the Ultrabook garbage and stop trying to port x86 into the mobile space.If AMD manages to pull ahead in the desktop space and gain some serious market share, Intel might just be losing on too many fronts. As for what they could do in the desktop space, I don't think there's much of anything they could do immediately. If AMD pulls ahead, they can't just, say, sell 3960s, only cheaper. The dies are too big for that to be economical.
/essay