How does Google store passwords for remote IMAP/POP services?

There's two sides here that some people may have confused. So let me keep them straight:

First of all, your password for your Gmail account (your actual Google password) is hashed responsibly. I haven't seen the details published publicly anywhere, so instead I'll just say that the people responsible for this care about security and have a very thorough understanding of what that entails.

But if you set up the "Mail Fetcher" to poll other mail services using POP3 and import their mail into your account, then yeah, obviously that utility needs to be able to get to the plain-text version of your password in order to log in as you and fetch mail on your behalf. This is a limitation inherent in any system that uses passwords, and it's unavoidable. Don't use that feature if this makes you uncomfortable.

I don't see anywhere any public documentation on how these credentials are protected, so unfortunately I can't comment on it. But again, I'll re-iterate my whole "smart engineers" sentiment.

Side note: Google has retrofitted OAuth2 into POP3 and IMAP specifically to solve this problem, allowing you to give a client access to your mail without giving them your login password. It also allows you to use your 2-factor setup with POP3 and IMAP. But so far it hasn't gained much popularity beyond Gmail, so it's not particularly useful for the mail fetcher tool.

Disclaimer: I work for Google.
Second Disclaimer: I do not speak for Google. These thoughts and opinions are my own (which I think makes them all the more valuable).