By default Gmail doesn't allow pop. The pop protocol always pulls and deletes the emails from the server, while IMAP leaves the original always at the server.
Gmail would like you to user IMAP instead, you can use the settings for IMAP: https://support.google.com/mail/troubleshooter/1668960?hl=en this page also has a link to a page on how to enable and use POP in case you'd prefer that.
I just found out, after many tries, I should not add “@gmail.com” in the user name. Without, it worked nicely.
I also used IMAPS instead IMAP. I think this uses SSL, which is required by gmail.