That's only part of it.
Intel had an epic once in a generation stumble with a combination of very bad, very high impact choices all at once.
The NetBurst (Pentium-4) architecture was both hugely expensive to develop and manufacture and also extremely underwhelming. But that's only part of it. They also staked out the next generation advancement of the instruction set to a revolutionary and untested architecture (a VLIW variant) with certain compromises, all of which turned out to be a huge and costly mistake. It took almost a decade for the architecture to fully mature and even today it's still not very suitable for everyday computing. They hitched their system wagon to RAMBUS memory, which priced their systems out of the consumer-grade sweet-spot and their long-term contract with RAMBUS screwed them when DDR came around as an equally fast or faster alternative at a much lower cost. And they struggled with making decent chipsets for several years. One of the last pre-RAMBUS/pre-NetBurst chipset was the legendary 440BX which was hugely reliable, flexible, and high performance. After that intel chipsets had a long period of utter mediocrity.
In that window AMD made several strong moves. They produced high performance, low-cost chips using a very solid architecture. They developed an excellent next-generation 64-bit instruction set (x86-64) which had a great deal of heritage with the IA32 (x86) architecture and included mostly just very sensible changes and extensions. And they were able to create hardware which both ran existing 32-bit code extremely well and also ran new 64-bit code at competitive levels of performance. They also managed to put together a "whole system" in terms of cpu, chipset, and RAM which was at a very excellent intersection of affordability and performance.
Unfortunately for AMD, Intel very much learned from their mistakes, adopted DDR ram, vastly improved their chipsets, cut their losses on mistakes like IA64 and the early generation of EM64T systems, adopted the AMD64 / x86-64 architecture, and developed some excellent CPU technology in the form of the Core, Core 2, and Core i{3,5,7} architectures. Meanwhile, AMD ran into a few stumbling blocks and has had a tough time getting over them, let alone getting up to being able to compete head to head with intel again.