Russian company’s threat could affect gas distribution to Europe.
Gazprom had earlier threatened to cut off supplies to Ukraine this winter if the ex-Soviet country did not pay a $1.2bn debt for supplies in 2007.
Viktor Zubkov, the Russian prime minister, said the amount of debt had been reduced to $1.2bn from the initial $1.3bn claimed by Gazprom.
Speaking on state television he said Ukraine would partly redeem its debt by transferring some of its abundant gas stockpiles to Gazprom.
The breakthrough was reached at talks in Moscow with Viktor Yanukovych, the Ukrainian prime minister.
The two sides have yet to agree on gas prices for 2008, when they are expected to rise from the current $130 per 1,000 cubic metres.
Gazprom does not sell gas directly to Ukraine and operates via a Russian-Ukrainian gas venture called RosUkrEnergo.
Analysts have repeatedly criticised the scheme for lack of transparency as RosUkrEnergo has never disclosed its full list of owners.
Russia cut off gas to Ukraine last year in another payment dispute, leading to disruptions in supplies to several European countries that depend on the same pipelines running from Russia through Ukraine.
The EU had urged the two sides to come to an agreement.
Critics have accused Russia of using gas supplies as a political tool against Viktor Yushchenko, the Ukrainian president, and Yanukovych’s fierce political rival.
While Yanukovych wants to maintain closer ties with Moscow, Yuschenko favours seeking closer ties with the EU.