It happens to me before in the past, that when my screen was frozen while tapping, I accidentally hit a button for paying for gems for any item in the forest.
The same happens to me today. I payed 100 gems for 29.000 apples by mistake. Just send a support ticket for a refund. Hopefully they will give my gems back.
In the future it's kind of handy if we get a next screen whith a question if we really want to pay gems for something like this.