Ack, my next game was going well. Very similar sort of situation, one AI on my continent, which I killed. This time I was better at managing my cities and didn't get as far behind.
I was almost finished with my spaceship when the other superpower declared war on me out of the blue. He landed with a huge army of marines and tanks, as well as a pile of older units. If he had attacked my city from the sea with the marines it would have hurt -- but he instead landed the whole force next to the city and I had time to swoop in with my mech infantry and gunships and tear it to pieces.
I finished the ship and sent it on its way. A few turns before my victory, the third superpower, who I had been ignoring because he seemed so far behind, suddenly won a cultural victory.
So close!
So close indeed, and it's hard to be too critical when you're moving up a level. But not much happens "suddenly" / "out of the blue" in Civ if you know where to look:
1. War declarations are normally preceded by a period of the AI plotting war (aka WHEOOHRN or "We have enough on our hands right now" - the diplomatic response when you ask them to declare on someone if they're already plotting). So every so often, check the diplo screen for likely enemies and if the "Declare war on X" option is coloured red (meaning it's unavailable), hover the cursor over that to see the reason. If you get WHEOOHRN then they're plotting war. Alternatively, and if you're playing BTS, the
BUG Mod will helpfully tell you this without having to trawl through diplo screens. WHEOOHRN doesn't necessarily mean they're plotting war on you, but you can take a good guess at that from the relations screen. If you think they are plotting on you, then either prepare for that by building up your troops, bribe someone else to declare on them, or (most simply) beg 1 gold off them, which gives you 10 turns of peace. Occasionally the AI will declare without plotting, eg if they're bribed into war by another AI, but this method usually works.
2. Culture victories can't happen suddenly - it takes many many turns of constructing culture-enhancing buildings and wonders, spreading religions, popping great artists and building culture. You can see this quite easily from several sources: spies can reveal what a city is building; a series of great artists born in the same civ is a giveaway; a slow tech rate often means the AI is running the culture slider very high; and most simply the victory conditions screen (F8) will show how close the most cultured civ is to winning this way. Again, check regularly... and if anyone is getting close then either declare on them & capture one or more of their 3 most cultured cities, or if that's not possible use spies to sabotage cultural buildings or wonders in those cities. That ought to buy you enough time for your spaceship to make it.
In neither case rely on the scoreboard. An AI's score says nothing much about its willingness to declare on you or its pursuit of culture. In fact the scoreboard doesn't say much at all unless you're going for a time win.