How to set gmail sync frequency?
First, Gmail provides push email.. means, you get emails exactly when they arrive (if you are connected with internet).

Second, Gmail doesn't have dedicated sync module. It makes use of global Google Services Framework and Account sync module. You can turn off background data and Auto Sync from Accounts and Sync setting. When these are ON, sync is carried randomly.. but it runs when you connect to internet or turn these settings on.

To save battery, you can use toggle widgets (like Widgetsoid) to turn those settings on/off manually. Some provides way to force sync, too. To automate it, use Tasker app.

If your prime goal is to save battery, I would recommend you to use, Juice Defender. It takes care of all these effectively.