Mac Mail downloads my entire gmail account can i just get the last 30 days?
Apple's mail will get all the messages by design. There isn't a setting to tell it to stop after a certain volume of downloaded content or some message count or attachment count.

You'll find that altering the server settings if you can will be the only way to change the volume or number of messages.

Exchange has a setting to limit the number of messages and calendar items that sync. Gmail also has settings you can configure (under settings) for IMAP to download only the last 1000 mails. You can also exclude entire mailboxes and folders in Gmail to prevent them from ever being seen by an IMAP client such as Apple's OS X Mail or iOS mail apps.

If you can't alter your server settings, you may have to change the volume of messages you store in that email account.