Long thread on GPU failures and replacements here on Macrumors
https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/
I am assuming you have the 6970m graphics card and those seem to have an extremely high failure rate. Apple had a 4 year replacement program for them but that has long expired. To save you some reading in the thread mentioned above...
1) The 6970m is a custom Apple graphics card. You can't buy a 6970m from a PC Laptop and use it.
2) Buying a "new" 6970m is pretty much impossible. Apple ran out of them a long time ago and anyone saying they have "new" cards is almost certainly selling you a reflowed/reballed card. Those will just fail again since the defect is in the GPU silicon package itself and not in the solder balls of the large GPU assembly.
3) There are other cards that can be made to work... sort of... without boot screen, and flashing the UEFI, and heat sink mods, etc... but I suspect that is well above the enthusiasm level of most.
4) The 2011 iMac 27" also came with 6750m and 6770m options which are both much lower power (in both senses of the word "power") devices but from what I can tell have a much much lower failure rate.
What I am choosing to do with mine?.... Ordered a 6770m card off eBay and will replace the 6970m. I will have much lower graphics performance but at least I will have a working iMac that won't likely fail in the next 6 months with a recalled 6970m.