AMD has had several years to watch and reverse engineer Intel's Core CPU designs. All is not public of course, but I suspect they have a pretty good idea of it.
Now AMD is given a chance to redesign their own uArch from scratch. Surely they are quite aware of what needs to be done. When you're allowed to redesign and engineer stuff from scratch, it almost always gets better because you never get everything perfect the first time. At least that's my own experience from working with SW design. From my knowledge of chip design (which is much more limited to be honest), I'd say it's the same in that area too.
The important thing to notice here is that Intel's CPU performance has not been increasing very rapidly since Sandy Bridge. If it would have, it would be much harder for AMD to catch up, since then it would be sufficient to match a 4-5 year old CPU (Sandy Bridge). AMD would then have to match Intel's latest CPUs instead, which they have much less knowledge about.
So in essence, the slow performance increase of Intel CPUs the last few years has given AMD a perfect opportunity to catch up.