"The debt should be paid to the last ruble if they do not want the economy to suffer from Russian sanctions. The situation cannot be tolerated any longer," Medvedev said in an interview with leading Russian television channels.
Ukraine was reported to owe Russia more than $2 billion for the supplied gas. Russian energy giant Gazprom earlier threatened to cut off supplies at the start of 2009 as new contracts cannot be signed as long as the debt is outstanding.
Gas talks between Russia and Ukraine have been closely watched by European countries, which import a quarter of their gas needs from Russia. Ukraine transits about 80% of Russian gas bound for Europe.
"We are not pursuing a goal of cutting off supplies," Medvedev said. "But if Ukraine fails to pay, we will use a whole arsenal of measures, there must be no illusions on this score, but we will fulfill our obligations to consumers in other countries, including Europe."
Gazprom's spokesman said on Wednesday the monopoly and Ukraine's national oil and gas company Naftogaz were unlikely to reach a new gas contract before January 1, but said supplies to Europe would be unaffected.
"The situation is critical: We may not have a contract by January 1," Sergei Kupriyanov said.
The 2006 gas row between the two former Soviet states resulted in a brief cut in supplies to Ukraine and shortages were reported in Eastern Europe.
On Tuesday evening, Gazprom denied Ukrainian President Viktor Yushchenko's statement earlier in the day that Ukraine had resolved the gas dispute with Russia.
"A total of $800 million was paid from the reserve funds [of Ukraine's National Bank] and more than $200 million was transferred from Naftogaz profits, and a part of the debt was restructured for January-February," Yushchenko said. "So the issue has been resolved as of today."