Just type in your password and 6-digit authorization code.
Why would Apple, the same company that refused to unlock the iPhone that was used by a San Bernardino shooter for the FBI, care for your password. You are insignificant to them since you're account is only one of 500 million iCloud accounts. In fact, that article showing the number of user accounts was from June 4, 2013; that's over 5 years ago.
This help page has a section that tells you how two-factor authentication works:
With two-factor authentication, your account can only be accessed on devices you trust, like your iPhone, iPad, or Mac. When you want to sign in to a new device for the first time, you'll need to provide two pieces of information—your password and the six-digit verification code that's automatically displayed on your trusted devices. By entering the code, you're verifying that you trust the new device. For example, if you have an iPhone and are signing into your account for the first time on a newly purchased Mac, you'll be prompted to enter your password and the verification code that's automatically displayed on your iPhone.
Because your password alone is no longer enough to access your account, two-factor authentication dramatically improves the security of your Apple ID and all the personal information you store with Apple.
Once signed in, you won’t be asked for a verification code on that device again unless you sign out completely, erase the device, or need to change your password for security reasons. When you sign in on the web, you can choose to trust your browser, so you won’t be asked for a verification code the next time you sign in from that computer.
Once you verify, the popup will never show up again on that device unless you reinstalled the OS or something similar to that action. You could even change your iPhone's password if you were still fearing that Apple is going to hunt you down.