Mavericks does not delete Gmail emails
Google recommends the following configuration for Gmail on Mail.app OS X:

From the Mail menu, click Preferences &gt; Accounts &gt; Mailbox Behaviors
Drafts:
Store draft messages on the server &gt; leave unchecked
Sent:
Store sent messages on the server &gt; leave unchecked
Junk:
Store junk messages on the server &gt; checked
Delete junk messages when &gt; Never
Trash:
Move deleted messages to the Trash mailbox &gt; leave unchecked
Store deleted messages on the server &gt; leave unchecked

Also, trash gets emptied on its own on Gmail; mail older than 30 days gets deleted automatically, so other than particular workflows or because of lack of space on the server or locally, deleting mail already on the Trash folder should not be a preocupation.
I've seen tweaks and counter-suggestions from other reputable sources, I'm not linking them here because they are fairly old.
That said, Joe Kissell and others accuse Gmail of not following standard IMAP implementations –so much so that Mavericks accommodated its interaction with Gmail entirely to avoid duplication and other problems–, and that could be the source of many of the problems.