Barney's right. All Mail folder is nothing more than a smart mailbox which shows messages in gmail's Inbox, Sent, and Trash folder, no matter which they actually reside in. Moving a message from the inbox to it does nothing because it isn't really a mailbox. Useless in my opinion.
Create another imap mailbox in gmail either at the gmail website or in the Mail application. The mailbox should be located in the gmail folder in the sidebar. You can move your messages to it. GMail also has an archiving feature you might look into. It's generally set as default or at least use to be. Unless you just want to manually save individual messages.
GMail has many settings you can change to customize it for an individual's use at their webmail site. I would advise you to explore those options for archiving messages, mailbox behaviors, disabling mailboxes in imap such as All Mail, and many other settings.
You should google using gmail with apple mail for plenty of information customizing it for your mac.