If you're really into gaming and are willing to pay extra then the MP with the 5870 is without question the better option. If you're not willing to pay for the 5770 and don't plan on upgrading in the future then go for the iMac as it's the better package.
From a pure gaming perspective (not worrying about cost)
The 5870 will destroy a Mobile 5850. This has been beaten to death in the PC world and has become an accepted given. Thus MP > iMac
The MP with a 5770 is about equal to a Mobile 5850. MP = iMac
The problem with the iMac and gaming is that you're trying to drive 2560 x 1440 pixels with a mobile card that is limited by a 128bit bus. (From a gaming perspective ) --> Apple did good by using 1gig of DDR5 but when push comes to shove the card doesn't have the bandwidth to access that ram fast enough to push 2560 x 1440. Of course you can run at non-native resolution and turn down AA but then you're sacrificing on the primary reason you bought the machine.
The best thing you get from an iMac in my opinion is the screen. Right now you won't find a 27inch ips screen for under $800. This adds value to the iMac proposition.
Other things to think about:
Pro MP
Ability to add extra hard drives that are not limited by firewire or USB
Ability to add PCI cards ... USB 3.0, eSata.
Ability to drive 3 or more screens.
Ability to add blueray
Upgradeable processor
Upgradeable graphics card
Pro iMac
Ram is cheaper
Smaller footprint
(kick ass screen)
Thus my personal logic would be buy the MP if you're willing to pay for the 5870 and an external screen. If the cost of the external screen and 5870 cause you to opt for a 5770 then ditch the MP and go with the iMac.
I had this exact dilemma 3 months ago and chose a different route. I went the hackintosh direction and haven't regretted it. I didn't want to be limited by mobile gpu's/lac of expandability and didn't want to pay a premium for a MP that was super out of date (only to be forced to spend more to have it upgraded right away).
Good luck. Once you make a decision don't look back.
P.S. Apple GPU drivers notoriously stink. The more power you have to drive graphics the better. You won't regret the 5870.
