Assuming I find a merchant willing to sell gold bullion with a credit card, are there any pitfalls to this besides the additional fee the merchant may choose to add for credit card purchases? Is it legal to buy gold with a credit card? Could the credit card company deem it a cash advance, or is it treated as an ordinary purchase? Or is this a grey area, like purchasing gift cards, where they don't care if you do it a little but will give you a call if you do it a lot?
Could the credit card company deem it a cash advance
Yes. For example, Amex did that for a while. You should check with your card issuer what they consider as a cash advance.