Yes, you can buy Microsoft Points using a gift card, just like you would with a credit card. During checkout, simply choose your payment method and enter the gift card information.
It's a convenient way to add points, especially if you received a gift card as a present. Just follow the prompts and your points will be ready to use in no time.