Gem are the game's premium currency. They are typically used to purchase new builders to speed your progress. Use the "Activity" screen to complete quests and tasks to earn specific rewards, including gems. You can also engage in the "Wanted" battles for a chance at new heroes, gems, and other items.
Resources
Intentionally drop your trophies to a low level to get matched in lower difficulty battles. To drop you trophies, send just one unit out then forfeit the battle. By losing the game repeatedly your trophies will begin dropping. By doing this, you can farm gold and energy easily by defeating lower-ranked opponents.