Obviously there can be a cost involved with getting a city-state to ally with you, in the sense that you gift them gold to get reputation. But I noticed in my game the other night that allying with a city-state to get their resources appeared to cause my gold per turn to fall precipitously. Am I now paying maintenance on the roads that are in their territory? Are there other possible explanations?
Simple answer: No, not directly.
I played around with my save game, and the difference appears to be that as a result of going into "We love the king" mode, my gold from cities went down dramatically. I would guess that this is because the civilians were assigned to food instead of money to take advantage of the growth benefit. I guess this means you have to keep a close eye on how your civilians are assigned, especially later in the game when maintenance is high and money is a lot more important than a little population growth.
My experience shows that it is not only "We love the king" mode. Also if you change from unhappy to happy cities change production to focus more on food and this results in a drop of gold/science production.