Not sure what you're on about.
I use my 3G iPhone all day, reading mail, creating mail, deleting, etc. When I get home, I wake up my MBP running Mail.app in Leopard, and all the mail gets downloaded to Mail.app. No worries. I use Mac.com (aka MobileMe) for my e-mail.
A couple things I've noted:
1) Any messages "read" on the iPhone don't get sorted by the rules in mail.app. If I leave the message alone, or tap "Mark as unread", that works fine.
2) messages that stay in the inbox stay on the iPhone, but if they get sorted to a local folder on the MBP, they disappear.
I don't know what to tell you about gmail, though. I've tried to use gmail, and I may be the one person on the planet who isn't impressed. But I can't tell you how gmail, the iPhone & Mail.app all work (or don't work...) together. There may be a setting on one of the three that will help you out. Though I think you're on the right track by shutting down Mail when you're not at the computer.

