Did you redeem the gift card onto your account?
click here ➜ How to redeem your Apple Gift Card or App Store & iTunes gift card - Apple Support
Is the balance visible on your account?
click here ➜ Check your Apple Account balance - Apple Support
If so, what exactly is happening? Are you sure you are being charged? Maybe its just requesting you verify your payment method.
Verification of your payment method is required if there is an issue with it, before it used your account balance. Once verified it will use your account balance, and should not charge your payment method.