I may have spoken too soon. Apple says that to set up iCloud mail you must be using OS X 10.7.5 or later. And yet, when I double-checked by firing up my OS X 10.6.8 machine, I found Mail.app happy to show me my latest email messages.

I remembered that Apple made a big change in mail handling going from MobileMe (which is defunct) to iCloud (which replaces it). For a limited time, you could migrate your MobileMe account to iCloud, but the window for doing that has closed, all the original un-migrated MobileMe data has been deleted, and the servers shut down. MobileMe mail used to support POP; iCloud mail is IMAP-only. If you migrated your MobileMe-style Apple ID (one ending with @mac.com or @me.com), it became an alias for your new iCloud-style Apple ID (ending with @icloud.com), and your mail messages were migrated; otherwise, the account was closed and your mail messages discarded.

If your version of Mail is asking specifically for an iCloud password (and not merely for the password of an account you named "iCloud"), it must be iCloud aware. Even if you give it a defunct (non-migrated) MobileMe account name, it should just give you an error message. It shouldn't summarily quit. So, it's probably not a version problem. Have you checked for relevant console messages?

Can you log in using Mail.app from a different user account?

What happens if you delete your iCloud account (in Mail, which won't delete anything from the server) and re-create it?