Like every other email client AppleMail uses mailboxes to organise emails. Gmail uses labels which doesn't fit to mailboxes. This leads to undesirable results when archiving. Emails have a location in the mailbox folders of AppleMail. All emails from Gmail are in the All Mails folder and not in the individual mailboxes. Therefore, Mail Archiver needs to have the All Mails mailbox to archive emails.
If you don't have the All Mails synchronised for your email client then archiving will not work.
Here is how to make sure that All Mails is showing up for your email client:
1. In the webinterface of Gmail go to Settings -> All Settings:
2. Now go to the Labels tab and make sure that for All Mail "Show in IMAP" is selected:
If "Show in IMAP" is not selected click on the show button in the middle column.