I would like to add that your size will effect it too, if you are smaller than them, then they will trade for stuff in their favor, if your strong you can trade for stuff in your favor, to test this try to trade 20 gold for 20 gold, if they do not except then they think your weak and do not deserve a fair trade, if they trade like 25 gold for 20 gold from you then they think your strong and dont want to upset you.
I think this is incorrect, in fact there are reasons why it would be the opposed.
First of all, you can't trade gold for gold, they will never accept such a trade.
You can trade gpt for gold, or gold for gpt. In either case, you will always end up giving them more gold than you get in return.
(on a side note, I've had a problem with the AI refusing a trade a couple of times, I discovered the problem was that I was accidentally asking for either gold or gpt when I was also offering the same back, an such trades are never accepted)
When you trade lux, the value of the lux is determined by the amount of happiness effect it will give you empire wide. For example, if you have 10 cities, and they have 21 cities, assuming none of those cities has marketplaces, you can trade 1 lux and get 2 in return. But if all your 10 cities have marketplaces, (and the AI doesn't) and you already have 6 lux, then you will need to offer 2 lux to get 1 in return.
(A small exploit is possible: if you disconnect some of your lux, then trade, then connect them again....)
Having a smaller empire will help you in trading lux in your favor.