Thanks messybeast. I tried that again (although I'd tried it before) and still got the pop up box "Enter your user name and password for the following server: imap.gmail.com . The user name that appears is my email (gmail) address, and, as before, five attempts before a failure registers.
I thought I'd be clever and try using Windows Live Mail, but when it asks me to download folders, (part of the set up process), the same box appears.
One site suggested disabling IMAP while installing the account onto Outlook. Didn't help. Box still appeared and will not recognise the password.