Are you able to buy an online gem code and use it in Belgium?
Yes, you should be able to purchase gem cards and redeem them, even if you're from Belgium.
There has been an official statement following the changes they went through, in which they basically state that only certain items have been restricted. Trying to view an item that is restricted for your region will show an appropriate error message.
We have now implemented a more refined system, which only restricts the purchase of loot boxes and related items, such as chest keys, dye kits, and certain packs by players located in Belgium. For players located in Belgium, you will see the following message when viewing these items "This item is not available for purchase in your region." All other items and purchases are now available.
Source: https://en-forum.guildwars2.com/discussion/comment/697780/#Comment_697780
Read the ArenaNet FAQ for further explanation about the reason and what has been restricted.