The iMac G5's are plagued with issues, and the failure of the GPU comes as no surprise for somebody who's worked on so many of these.
To repair this machine, it will require replacing the motherboard. Personally, it'd be far more economical and feasible to just buy a new machine than go through the trouble. Luckily, though, transferring all of your data to a new Mac would be as simple as connecting a FireWire cable and using Target Disk Mode.