Try to check time on your mobile, i saw this advise in one FAQ. I will not provide a link (don't want to make advertisement) but here is quote:
Question: I have a problem in activating and using the Two-Factor Authentication. It says invalid confirmation code.
Answer: It sounds like your device is out of sync with the time servers used for Google 2FA. If you check the settings in the app on your smartphone, there is a “Sync Now” option or "Time correction for codes." You can also set the clock settings in your mobile device to auto update over the network.
If you are using an iPhone, please go to Settings -> General -> Date & Time.
If you are using Android phones, please go to Settings -> Date & Time Settings.