When using Mail app of iPhone, iPad or iPod touch to access Gmail, occasionally additional labels named Deleted Messages and Drafts will be created on Gmail web interface (and on subsequent IMAP access).
The additional labels with the name of Deleted Messages and Drafts are created by iOS Mail app to store and hold deleted emails and drafts respectively, when the default Gmail IMAP folders for deleted messages and drafts, namely Trash and Drafts are not been made available to IMAP service.
Note: The Mail app is configured to delete Gmail emails and not archive Gmail messages, which otherwise would cause the mails to be sent to All Mails folder.
To fix the issue, just make sure that the Trash and Drafts folders of Gmail is visible on IMAP, and that iPhone, iPad or iPod touch Mail app is been configured to use the Gmail’s folders as the destination for deleted messages and drafts.
Firstly, go to Gmail -> Settings -> Mail Settings -> Labels. In the last column, ensure that the check boxes for “Show in IMAP” are selected (ticked) for Trash and Drafts.
Then, on the iOS device, go to Settings -> Mail, Contacts, Calendars and tap on your Gmail account name. Then tap on Account button, and go to Advanced. Under “Mailbox Behaviors”, tap on Drafts Mailbox and select Drafts under “On the Server”, likewise for Deleted Mailbox to select Trash under “On the Server”.
Once the settings is correct, the iOS Mail app should correctly place the deleted email messages and drafted email messages on correct folder on Gmail cloud. And you can remove the unused “Deleted Messages” and “Drafts” labels for good.