iPhone & Gmail account

If You have iPhone and are not able to add your gmail account or if authentication fails, then following condition applies:

You have turned on two steps verification for gmail account then you need to authorize your iPhone device. When this is done a password DIFFERENT from your google account password is autogenerated by Google. It is this autogenerated password that you need to enter into your iphone. So here’s what worked.

Log into your Google account through https://www.google.com/accounts/Login and go to Personal Settings > Security > Authorizing applications & sites and revoke your previous access to iphone (if any)

Then create it again and when the password is generated in the ‘Generate new application-specific password box’, use that new generated password in your Gmail Account Information on the iPhone below your email address.