I was responding in another thread about AI comebacks when I came up with this idea, which is present in the other thread as well as this one:
When an AI is clearly losing, they might have a priority shift, and assume a new decision making algorithm that dictates their behavior. For instance, if they are slowly losing cities to you late game and it appears that they cannot gain allies to turn the tide, they have a good chance to switch to a desperate-times-call-for-desperate measures algorithm in which they might, say, move all of their units into one massive army, leave all but perhaps their capital defenseless, and book it toward your channeler/capital city in a risky move to seize victory from the jaws of defeat (think Battle of the Bulge). If they are lucky enough to achieve this specific objective, it might improve the odds of other opponents (who were sitting on the fense or have poor diplomatic relations with you) being inspired to join with the cause against you. If they succeed in turning the tide, they would revert back to their previous stable behavioral algorithm.
Now, this kind of strategic shift doesn't have to come precisely in this flavor or occur every single time you are winning a war late game, but the general idea is that the AI makes a desperate move that has a chance for catastrophic success or catastrophic failure--- the chance of either being contingent on how deep of a mess the AI is in.
This would serve to remedy a few separate problems. First, it will challenge the player at a time when they would normally be slowly and tediously steam rolling opponents in other strategy games. Second, if the AI is unsuccessful in its all or nothing bid, it is much easier to inflict a decisive defeat upon it, thus avoiding the boring chain of time-consuming-guarenteed-victory-battles involved with mopping up opponents (perhaps the remnants of the opponent's civilization will begin defecting over to you or offer an unconditional surrender once it has failed to reach its specific objective, with their remaining cities flipping over to you over the course of X number of turns.)
This method doesn't require any cheating on the AI's part, but can still spice up the late game when victory looks like it is almost guarenteed.