You were winning, but now you're suddenly losing quite badly. Or maybe you were losing from the start. Either way, isn't your day. Here's some tips.
Case 1: Your openings are different
Let's say you open 5/2 instead of the 3/4 you wanted, in a game with Steward. The early trashing from Steward is key, and unfortunately if you want it, you're going to have to buy nothing with your 2.
So don't open Steward unless you have to. Presumably your opponent will open Steward/Silver, or some variant thereof. If you try to follow the same opening as your opponent without the silver, you're purposefully placing yourself in a worse position from the start. Try to see if there are any other cards, particularly $5 cards, that are reasonable openings. If there is really no better alternative, buy the Steward, and hope you have better luck or enough play skill to overcome the gap. Even if there is a $5 card you want, you still want to pick up a Steward turn 3 or 4 though, because it's too strong to ignore entirely.
Case 2: Your opponent is ahead 2 or more provinces
It's hard to explain how exactly you want to play in this situation. On one hand, if you don't buy duchies, you're going to get blown out when the other player buys them. But if you buy too many, your deck will just die, and you won't be able to do anything.
Remember that your opponent's deck is getting clogged as well. Watch to see if their deck seems to falter or slow down. You will want to buy more duchies than you think you need. However, if your opponent's deck has faltered, and you're near a reshuffle, consider getting a Gold over a Duchy.
This increases your variance for the better. If you have enough good cards, you'll have a reasonable chance of drawing a pretty good hand that can help swing the game.
Case 3: You were ahead, but now you're not
The best way to deal with this by far is to try not to have it happen in the first place. If you're ahead by a comfortable amount, you can afford to buy one or two non-victory cards. Although this doesn't help increase your lead, it does help you improve your deck's ability to continue functioning, especially if it's an engine deck that requires certain combinations of cards.
If you're already in this situation, it likely happened because your deck has stalled, often because of all the victory cards you've been buying. Unfortunately, if you had a lead, then lost it, the game is probably going to end very soon. Play like you normally would, except you're probably going to break the PPR. Your goal at this point should be to last long enough to trigger a reshuffle, because that gives you a second chance at drawing a good hand.
Above all else, remember that it's not the end of the world if you lose.
Edited to fix typos, missing words, etc.