By Vanessa Mock and Laurence Norman 

BRUSSELS--Ukraine and Russia were set to resume talks on Thursday to resolve their natural-gas dispute, with officials scrambling to secure funding for Kiev to pay for gas deliveries.

Officials said they were confident they would be able to patch together a financing plan on Thursday to enable Ukraine to pay upfront for Russian gas, in a move that would clear the final hurdle to a deal.

European Commission President José Manuel Barroso said that an agreement was "within reach" and urged both sides to take the chance to clinch a deal. Mr. Barroso called Ukrainian President Petro Poroshenko several times as negotiations in Brussels spilled into the early hours of Thursday.

The talks under way in Brussels, the latest in a half-year long round of high-level meetings, come amid fears of possible gas shortages in Europe if the flow from Russia to Ukraine isn't restored.

The European Commission said officials currently were "in very intense consultations" to pave the way to a deal ahead of Thursday evening, when officials from Kiev, Moscow and Brussels were expected to resume formal negotiations.

Kiev still needs to raise money to cover some of its gas debts to Russian gas monopoly OAO Gazprom, as well as a $1.6 billion upfront payment it would need to make to receive four billion cubic meters of gas for November and December. Kiev said last week it would pay $3.1 billion toward its past debts, in line with the terms of the tentative deal.

EU officials said they were considering a range of financing tools, including a bridging loan of around $1.5 billion to pay for future gas deliveries, which could be arranged with the International Finance Cooperation, which is the World Bank's lending arm, and the European Bank for Reconstruction and Development.

"We're really looking in every possible purse," one official said.

Another person familiar with discussions said Moscow was eager to secure a deal on Thursday, provided Ukraine could guarantee it had enough money to make the agreed payments. It wasn't clear whether a deal would simply cover the final two months of 2014, or would also seek to cover the first months of next year.

Two senior EU officials said part of the money Ukraine would use to pay for Russian gas would come from an International Monetary Fund loan which was supposed to go toward building up the country's reserves. An IMF official attended Tuesday's meeting. The Washington-based lender would need to formally approve this change in the use of its funds.

The Wall Street Journal reported Tuesday that the European Commission, the EU's executive, is close to signing off on two more disbursements of loans promised to Ukraine, money that would give Kiev some EUR760 million ($968 million) in additional funding by the end of the year.

The EU official said there will also be a third balance-of-payments package for Ukraine, although this would need the backing of EU governments and disbursements of this cash could still be months away.

The current dispute was triggered after Russia nearly doubled Ukraine's gas price in April after the ouster of Ukraine's pro-Kremlin government.

Since then, the EU's energy chief, Günther Oettinger, has been pushing for a deal to avoid a repeat of similar disputes in 2006 and 2009, which led to natural gas shortages in Ukraine and several EU countries.

Russian gas accounted for more than a third of the EU's natural-gas imports last year, with around half of those supplies piped through Ukraine.

Write to Vanessa Mock at vanessa.mock@wsj.com