There's no denying it: locally caching messages in Gmail on the iPhone (via the storage capability in HTML 5, similar to Google Gears) is fun and good for you, especially if you don't connect to your Gmail via IMAP in the regular iPhone Mail application. Unfortunately, if the local copy of your mail gets funky, things can become difficult and much less fun.
John F. sent in this handy tip for resolving issues with cached Gmail; his suggestion is a quick dive into the iPhone's Settings app, then navigating to the Safari preferences to clear out the local database that stores the cached mail.
You may have to wait a bit the next time you connect to Gmail in Mobile Safari as the messages are re-downloaded, but any wacky cruft should be gone. While you're in there, take a look at some of the other settings options; you may discover choices you never knew you had.