One common reason for this issue that the IMAP is disabled. So you must enable it so Gmail can work fluently on your iPhone. Open Gmail as the mobile Gmail site which is placed at the bottom of the screen. When it opens, scroll down to the bottom of the page to fix Gmail not working on iPhone, and look for the links next to View Gmail in and select Desktop. Tap Settings and then Forwarding and POP/IMAP. Locate the IMAP and enable it. This should solve the problem for you.
Read all above Official Blog Post To Fix Gmail Account.