You will earn Gems after clearing the last stage in a Quest zone for the first time. For example, you can earn gems from the following Quest areas:
8 Gems from Mistral, 7 Gems from Morgan, 7 Gems from St. Lamia, 8 Gems from Cordelica, 8 Gems from Amdahl, 8 Gems from Encervis and 8 Gems from Palmyna.
Some EVENT Unit Vortex quest will grant a Gem after completing it's final level such as Lv 3 Alma, Lv 3 Battle Maidens, etc.
You can also earn a Gem the first time you complete the Metal Parade and Jewel Parade, and every three Arena ranks starting at Novice. (Total of 9 Gems you can obtain from Arena Ranks)
Frontier Hunter EX - Will Grant a certain amount of gems depending on how many points gained within each run.
The Daily Tasks feature is also a good source of Gems. So be sure to get those milestone rewards. If you want to know more about this feature you can check this article.
There are also some events where the Brave Frontier team will distribute gems due to; recent Facebook events/contests and special distributions.
The Daily Login Reward also has a chance to give you a free gem once you max out your Rarity Bar. Just be sure to log in every day.