If you can get your iPhone 4 unlocked it will be surprisingly easy for you to get along with it in Beijing, and since AT&T doesn't have the greatest international rates, unlocking will probably be your best bet. Once there you can easily get some cheapo, pre-paid phone for its SIM card and use that carrier's service to draw the pre-paid minutes when you want to use data. The worst I can foresee you having to do is trim a SIM card to size for the iPhone 4's micro slot, but that is easy. And yes, if you're not able to unlock your iPhone, Airplane mode with wifi enabled will work fine at a lot of locations.
Something you should be prepared for is the censorship. Unless you can set up a proxy for your phone you'll be faced with limited internet service. A lot of your favorite web pages will be blocked or will otherwise not work on your iPhone so you may not be able to take full advantage of your data. I haven't checked this since Google's recent China issues, but Google Maps should still function. If not there is Baidu, GPS tuners, or local devices and applications. The Explore Beijing Subway app can be helpful with locating subway entrances and planning routes.
Security could be another issue. You may not have any problems, but you should be on guard when it comes to checking sensitive information through your iPhone. You may want to remove your normal E-Mail passwords from your iPhone and set up a temporary E-Mail for use on the trip, and also remove any sensitive information from your phone, like other passwords or billing information. If this is a business trip I'm sure that your workplace will warn you more about information security.
[Have lived in Beijing and used cell service there]