My Dad's 2011 iMac suffered the same fate, I followed a youtube guide to take the amd graphics card out and baked it in the oven to reflow the failing solder joints. Worked a treat.
Very easy fix as long as you are methodical and careful removing the connectors to the logic board.
There is a good thread in this forum too showing what you need to do.