It is not lawful to buy or sell gold in installments. Our Prophet stipulated that purchase and sale of gold should be in cash and the transfer should be on the spot. There are a lot of examples in history about finding a way for usury under the name of trading. Therefore, it is not lawful to buy and sell gold with credit card in order to stay away from usury.
For example, a person could buy 1000$ value of gold by paying 100$ on monthly basis with 10 equal installments and the same person may sell it to the same seller with the price of 950$ by cash. In this case, this person bought the gold for 950$ and became indebted 1000$ for 10 months. So this becomes usury.
Please see another answer alike: