If your gem balance is negative, something has gone wrong with a purchase. This can happen when your order is refunded after the gems have been already used.
Sometimes there can be technical hiccups where your payment does not go through and is automatically refunded.
For any refund issues, please contact Google or Apple.
For Apple (iOS) devices: Find "Purchases, billing and redemption" in Apple support.
For Google (Android) devices: Find the "Contact us" button in Google support to reach a Google representative.