Summary:

You can expend a Great Merchant while it is within a city-state's borders to conduct a "Trade Mission" with the city-state. This provides you with a huge chunk of Gold, and it boosts your civ's relationship with that city-state.