Turn the tide

To change what looks like defeat into victory.

At the beginning of the game we were losing badly but we turned the tide and won the game.