If an AI is bordering you, differently aligned, and significantly stronger than you, it WILL attack you. That I have no problem with.
What I do have a problem with, is that once you are at war, everyone smells blood, and will join on the side of the stronger combatant, which in the above case is the enemy AI. And once you start actually losing cities, or even battles, everyone attacks you.
And, no, there's not much you can do about it, except two HARD things:
1. Do not let AIs outpace you.
2. Make AI go to war with each other by bribing them, but only as way to to curb their growth.
Things that do not work, but should:
1. Non-aggression pacts. The AIs use them to wipe their ass.
2. Maintaining positive relations.
3. Relying on common allegiance.
4. Relying on distance, AI's already being at war, common enemy, etc...
In conclusion: Diplomacy can be summed up in two sentences: If you are weaker, you will be attacked. If you are much stronger, you can extort money.
Oh, if you are being extorted, do not bother paying. Sometimes, you will only delay the attack by 2 turns...