Contrary to what other posters are saying, I do think AMD is actually trying to compete; for example, they finally gave up on OpenCL and are trying to play catch-up to Nvidia via ROCm, effectively allowing you to run CUDA on AMD's server GPU offerings. And on the gaming side their top-of-the-line offering, the 7900 XTX, is ~$600 cheaper (aka 60%!) at MSRP than Nvidia's top-of-the-line RTX 4090 — and the prices you'd pay from e.g. resellers on eBay are even more skewed towards Nvidia.
That being said, they're just way, way behind. Nvidia can charge what they do simply because AMD isn't great at making GPUs. In gaming AMD never caught up to Nvidia's raytracing perf, and AMD's attempt to clone DLSS is significantly less performant. Meanwhile in AI/ML the industry consolidated around CUDA because OpenCL was never that great, and — Nvidia owning the standard, and having built around it for over a decade, gives them a really big advantage. Plus, every GPU sold in the last decade+ by Nvidia supports CUDA, whereas only the new server GPUs from AMD support ROCm.
Nvidia has executed incredibly well for decades: they pioneered shader programming, CUDA, raytracing, and DLSS. Arguably they even invented the GPU itself with the GeForce 256 in 1999 (as opposed to earlier "accelerator" cards). I struggle to think of anything AMD has done in the GPU space that matches even one of those accomplishments... Their only slight win is having OSS drivers for Linux, but honestly, that doesn't sell a whole lot of GPUs.
AMD caught up to Intel on the CPU side in part thanks to Intel's failures. Nvidia just hasn't fumbled.
Edit: Also, Intel is trying to edge their way into the GPU market as well with their Arc line of discrete GPUs, which is relatively affordable. They compete well on price, especially at the lower end: the A750 and A380 obliterate anything at their price points ($239 and $119, respectively). But, well, "at their price points" is a pretty critical part of that sentence. Their top-tier card, the A770, can barely eke out wins against the lower end of Nvidia's last-gen cards.
And re: 2008-2011 ATI comparisons from a sibling comment — by 2010 Nvidia's Fermi architecture was reliably beating ATI again, albeit with higher power draw, and in 2007 they had just launched CUDA which ended up being the most lucrative market segment for GPUs. In retrospect I think Fermi was much less of a flop than it seemed (and it was a fairly brief one compared to Intel's CPU woes).