I have a 27" iMac A1312 that boots up to a white screen with green bars. After some research, it looks like the video cards on these go bad and people usually upgrade to a diff model. Looks like I can get a Radeon 6770 or 6970 and some other options. The 6970 seems a little too high at $600+ for a 2009 machine. The original is a 4850. Is a 5750 good enough? It's about $300 on eBay.
I had a 2011 iMac 27" with 6770M up until late last year, when I bought the Dell in my sig. I spent quite a bit of time looking up replacement Apple MXM cards.
Long story short - I wouldn't do it. For every success story out there, there are utter failures. The iMac BIOS may or may not work with different video cards, and disassembling the things and getting it right is going to be risky / major pain. Plus the 2009 iMac 27" are selling for 650 - 850.
You would be better off, and it would probably be cheaper, to sell your 2009 for parts (probably can still get $500 or so) and buy a used 2011 or 2012.
I just checked ebay and see a 2012 with a 660M / 1TB HDD / 128GB SSD for $1150. The GPU will be ~ 50% faster than the 6770M that came in the 2011 models.
A quick look at notebookcheck indicates the 4850M performed about the same as a 6770M.
Only caveat here is if you are using the 2009 iMac as an external monitor. The 2011 and later don't allow that except via Thunderbolt and it must have another Apple computer with thunderbolt (ie, like a macbook).