If memory serves, even if you add a gift card to your account and it's credited, it will still automatically charge to your credit/debit card. I'm not sure if it's different these days, though.
The workaround for this is adding the gift card, then removing your card details and selecting 'None'. From there you can guarantee that the purchase will be credited to the gift card, and you can add the credit card back in later.
I'm sure another poster will be able to clarify if there's an easier way to do this!