Work out how much margin your broker will require to open a gold position at a given leverage — check this before you size a trade, not after your platform rejects the order.
Some brokers apply different margin requirements or maximum leverage for gold than for standard forex pairs — confirm your account's actual margin requirement before trading.