GMAIL is a unique mail system, it behaves neither like a pure POP email system nor a pure IMAP email system, it is a unique hybrid. Basically, what you think of as "folders" are, in GMAIL, actually more akin to "labels." When something is in the In Box, and you "move" it to a "folder," you are basically giving it another label, not physically moving the message. That is why you see it now in both places, it effectively now has multiple labels. Apple Mail, like other email programs, do their best to handle GMAIL messages within the existing constructs, but what happens is some non-intuitive behaviors, like what you see. Check your GMAIL settings carefully (preferably in the web-based GMAIL), you may think you are "Deleting" a GMAIL message, but it might be actually "archived" somewhere instead. You might find GMAIL's own apps work a bit more smoothly with GMAIL's unique systems (I use their app on my phone), but if you think of moving to folders as not actually moving them but adding another label to the message, that is more akin to what is actually happening.