I had the same problem and it was causing dozens of versions of autosaved drafts to appear in my Trash. (Gmail autosaves drafts at the server level and trashes previous saves. The feature is not customizable.)
Try this steps:
1) Quit Mail.app.
2) Log into Gmail in your favorite web browser.
3) Click on the gear menu and select "Settings".
4) Click on the "Labels" tab.
5) Under "System Labels", next to "Drafts", click on "show if unread" and uncheck the "Show in IMAP' box.
Now disable "Store draft messages on the server":
6) Launch Mail.app.
7) Select Mail > Preferences...
8) Click on the "Accounts" button in the toolbar.
9) Click once on the account name and then click the "Mailbox Behaviors" tab.
10) Uncheck the "Store draft messages on the server" box.
11) Close the window and opt to save your changes when prompted.
* You must enable the "Show in IMAP" option for the "All Mail" label in Gmail if you had it disabled before. (Google this tip for explanations and ramifications.)
* Mail.app now seems to automatically map the Sent, Junk, Trash and Drafts folders, i.e. you can't use this menu command anymore: Mailbox > Use This Mailbox For > Drafts / Sent / Junk / Trash
* I used to add the "[Gmail]" prefix under the "Advanced" tab of my mail account to eliminate it from the IMAP view, but it doesn't seem to be necessary any more, and might even have been causing some weirdness