Mail.app folders + iPhone/iPad = missing emails?
Be sure that you are making folders that are stored on gmail using IMAP.

It sounds like you are moving the messages to a local folder (on my mac) and the correct behavior in that case is to delete the message from all IMAP folders.

Mail keeps a local copy of all messages - so you still have offline access, time machine backups going back in time, and all the benefits of local storage when messages are "stored in a folder in gmail." Think of the location as the authoritative copy and not the only copy or even the most correct copy. When you make changes offline - those time stamps let the system sync your changes back to gmail once you reconnect and properly integrate changes with new mail that has arrived while offline.

Just to be totally clear - here are some pictures...

Try making a new IMAP folder like the picture below - you can rename it later if needed to see what creating a folder stored on Gmail looks like on your mail client.


You don't want it stored locally like this:

You can drag messages into the new folder or drag entire folder structures as long as you have time for the operation to sync / upload all the data to gmail servers. I have seen folders with 5,000 messages take two or three hours to upload even on normal internet with decent upload speeds so try first with smaller mailboxes to get the hang of things.