Maybe if I had left him at 1 city?
He got pissed at settling to close to him, my scout nearby saw him running over with his warcarts so I was able to get enough units in before his DoW and ended up taking 2 out of 3 cities of his.
He offered peace, throwing me all his gold, I accepted (lost most of my units, last city would have been hard to take at that time)
No problem so far, all other civs just neutral or happy.
When peace treaty ran out, gilgamesh denounced me instantly, and proceeds to DoW me a few turns after that, forcing me to just.. wipe him of the map...
I win, whole world denounces me, within 5 turns one declares on me, within another 15 turns half the world followed up, needless to say I lost in a turn or 30 after that