Thunderbird and Google Apps or Gmail – wrong password message despite correct password being entered

This is a frustrating issue – you have youreslf a shiny new Gmail or Google apps account, but for some reason when you try to add the account to Thunderbird it complains about your password being incorrect:  
Configuration could not be verified – is the user name or password wrong?
  After double checking that the password is indeed correct, the most common cause we have found for this is that IMAP is disabled in your gmail settings. Log into your gmail via a web browser and click on the gear in the top right, then select:  
Settings -> Forwarding and Pop/IMAP
  Once you are in the Forwarding and Pop/IMAP tab, scroll down until you see:
IMAP Access
  Hopefully the radio button for Disable IMAP is selected. If so, select “Enable IMAP”, save your settings and try again. Hopefully that ends your frustrating login attempts!