The Problem
After setting up one Gmail account in Mozilla Thunderbird I experienced trouble adding additional Gmail accounts.
While trying to add a new account a new Gmail browser window would open and prompt for account name and password. Though there was no problem for the first account, I couldn’t get past this point for subsequent accounts.
It looked like the browser page just reloaded over and over again after about 10-20 seconds. At first the email account name was auto-populated, but then the page would appear to reload and the account field was blank. I re-entered the account name and tried again. Usually it would reset the field as if nothing had been entered. On several occasions a reCAPTCHA challenge appeared, which I completed over and over again, but the page seemed to just reload.
The Process
I tried adding different email accounts. I tried on a new Thunderbird profile. I tried restarting Thunderbird. I tried restarting the computer. I waited and tried again on another day in case the issue was with the network or the site. I tried copying the link to a separate browser, which did allow me to enter the password but resulted in an error page saying the request was malformed.
Ultimately I realized some settings in Thunderbird had been altered and tried resetting those. That proved to be the issue.
The Solution
In Thunderbird Settings, on the Privacy & Security tab, in the Web Content section, the checkbox for “Accept cookies from sites” was unchecked.
I rechecked it and then I could add accounts with no problem.