For those folks wanting to use Thunderbird as a Gmail client and who are encountering an incorrect password error when attempting to configure the account in Thunderbird (irrespective of two-factor authentication), this is most likely due to Google enforcing OAuth. Google are spinning this as a “secure vs. less secure application” problem, suffice it to say opinions appear to vary on this.
For now, the conditions under which you may or may not see the incorrect password error prompt when hooking Thunderbird up to a Gmail account can be found here.
And on the Thunderbird developer community side, discussion about this can be found here.
EDIT: we’ll also highlight this most excellent point, from Twitter: