I've won on Deity while I already had influential civs over me. I was playing as Venice, everyone hated me because I wouldn't turn Commie and I kept doing everything in the congress to impede them as much as I could (voting for Freedom as World Ideology won me zero friends, as did voting down the International Games that I knew I couldn't compete in). I had three civs at war with me and my trade routes were decimated, except for a couple to nearby city states that I could defend.
Thankfully I had taken some early game measures to prevent a disaster and financially supported a couple of wars, which even though it impeded me it prevented any of them from becoming a runaway civ and since they could get culture over me but not over each other I just road the storm to a diplomatic victory just in time to avoid a pincer of Siam and Japanese Armies from absolutely smashing Venice.
The lesson is not to worry so much about how well you are doing, but to use whatever resources you can to pit the powerful AI's against each other. Oh sure they might be crushing you, but if they can't crush each other then they can't win either. Just focus on one victory path and prevent anyone else from being able to achieve whatever they are aiming for. Huge military civ building up? Bribe some people into attacking them, even if they lose it'll slow them down. Huge culture civ? Help another Civ compete, that way they can never get that last civ that they need. Use whatever asset you have and make them fight each other.