Gems could be spent in two ways:
 
1) You can triple your idle earnings in the welcome back window every time you open the game.
 
2) You can unlock some permanent boosters thanks to the card collection. You will get different improvements that will work forever in your game (even if you reset your city doing prestige). Take in mind that repeated card fragments are also helpful to level cards up. For example, if you win x33 card fragments for a specific improvement, you will reach a higher level and, therefore, a better booster.
 
Tap on the card icon (upper-right corner buttons) to know more about it!