lets go step by step.
1. in order to use 3rd party software with google, you need to have 2 step verification enabled on gmail account.
2. Go to google account.
3. Click on Security on the left side of the webpage.
4. Scroll down to "Sign into Google" (or something like that; here you will also find "Password last changed", "2 step verifications" and "Passwords for apps")
If anything than on this option you have "nothing"; no passwords set up. Click on it and a new window will open where you have to enter your passwords again.
On the next screen you select the application and the system ... Choose email and windows and click generate ... Than copy generated password into your
thunderbird account instead of your gmail password ...
You are done.