Google says that it's aware of a server error affecting some users who connect to Gmail using IMAP, and an active thread in the company's Product Forums suggests that some have been suffering without their normal email connection for as long as two days. It's unclear whether the problem is limited to the iPhone and iPad, though they certainly comprise a significant portion of Gmail's IMAP users: the default Gmail account setup in iOS establishes an IMAP connection rather than POP or Exchange ActiveSync.
Some commenters on the official forum are reporting that the problem is fixed, but as with many of Google's services, it doesn't seem to be rolled out to everyone just yet. In the meantime, the company reminds users that they can still use Gmail's mobile site — which is quite good in Mobile Safari — along with Gmail for iOS.