BERLIN—European governments are boosting their assistance to Ukraine as worries grow that Washington’s failure to approve new aid could cause Ukraine to lose ground in the war against Russia.

Europe and the U.S. increasingly believe that Ukraine will struggle to win significant territory in the near term and are focusing their efforts on enabling Kyiv’s forces to hold the line against Russia.

Following Ukraine’s failure to gain meaningful territory in its counteroffensive this year, the war has largely reached an impasse. Western leaders now worry that Ukraine’s growing shortfall in money and ammunition could offer Moscow an opportunity next year to regain areas itlost to Ukraine last year.

Until now, the U.S. has borne much of the burden of helping Ukraine militarily, with tens of billions of dollars in assistance. Now, Europeans are planning to take a growing role.

Germany’s government plans to double military aid next year; EU officials are working on new economic and military assistance; and other governments in the region are pledging to continue military assistance for years to come.

Russia is girding for what could be a long conflict, calculating that Western support for Ukraine could fade over time. Moscow has been expanding military production, including shells and drones, and has struck weapons-supply deals with countries including North Korea, increasing its capacity to wage a war of attrition against its smaller neighbor.

European officials say they will continue to support Kyiv in the coming months even if U.S. funding for Ukraine dwindles. European and U.S. officials see little prospect of the Kremlin engaging in serious peace talks with Ukraine before U.S. elections next November. European officials say they want to ensure Ukraine doesn’t go into that period weakened.

Ukraine’s military leadership is blunt about Kyiv’s challenges. Top military commander Gen. Valeriy Zaluzhniy, in a recent article in the Economist, said the battlefield increasingly resembles the attrition warfare of World War I. He said only a big technological leap for Ukraine, backed by Western arms, would break a stalemate.

Western officials say that no weapons system delivered to Ukraine so far has made a strategic difference on the battlefield and that fresh troops and ammunition are critical. Ukraine lacks both, and the West has been unable to match Russian arms manufacturing.

Ukraine’s failure to break through on the ground comes as international attention has turned to Israel’s war with Hamas and U.S. support for Kyiv has bogged down in Congress. Republicans in the House have agreed to fund only the Israeli portion of a proposed $106 billion package for Ukraine, Israel and Taiwan. However, Congress adjourned for two weeks Thursday night with none of the foreign spending approved.

The Pentagon now has about $5 billion in funding within its current budget to continue providing Ukraine weaponry. But another pot of money that is reserved to replenish the U.S. military’s own stocks as it provides Ukraine weaponry has run down to just $1.1 billion, meaning the Pentagon’s coffers are close to running on empty, officials said.

As a result, military aid packages have been shrinking. Typical packages, announced roughly every two weeks, are between $300 million and $500 million. The one announced Nov. 3 was for $125 million.

While the Biden administration has pledged to continue helping Ukraine, a new funding proposal might have to await until the new year.

These challenges have raised questions about how durable Europe’s commitment to Ukraine would be if the U.S. wavered. Senior European officials have said that U.S. support for Ukraine is essential and that the region can’t replace U.S. funding and military hardware.

But Europeans are trying to narrow the funding gap. Germany’s governing coalition recently agreed to double Berlin’s military aid for Ukraine next year, to more than $8 billion. Germany has become Ukraine’s second-largest military supporter behind the U.S.

“This is also a strong signal to Ukraine that we will not abandon them,” German Defense Minister Boris Pistorius said.

The EU is planning $54 billion in economic aid to Ukraine over the next four years and is discussing a regional security commitment for Ukraine that comes with additional funding.

France said this month it was allocating more than $200 million in additional money for Ukrainian purchases of French equipment, doubling the fund’s size. The Dutch government pledged more than $542 million to help Ukraine obtain ammunition, and Belgium said last month it would provide Ukraine with more than $1.85 billion next year, using proceeds from a tax on the profit made by Russian central-bank assets sitting in a Belgian financial institution.

During his first visit to Kyiv, Britain’s new foreign secretary, David Cameron, told Ukrainian President Volodymyr Zelensky this week that the U.K. would provide “the military support that you need not just this year and next year but for however long it takes.”

However, despite the pledges, the EU will fall far short of its goal of providing Ukraine with one million artillery shells by next March, as European stocks of shells and other basic military equipment run low.

Moreover, Hungary, which has grown increasingly opposed to the war, has been holding up EU military-aid tranches for Ukraine. Berlin, which finances a quarter of EU aid for Ukraine, has started to question how far it should be expected to contribute to EU military aid as well as bilateral assistance.

Western leaders have articulated varying aims in their support for Ukraine. Britain and some other countries have supported Kyiv’s goal of regaining full control of its territory. President Biden and German Chancellor Olaf Scholz have been more cautious, calling for a Russian defeat in Ukraine, but not talking about Ukraine winning.

The Ukrainian president’s chief of staff, Andriy Yermak, met with U.S. and European officials in Washington this week, including U.S. national security adviser Jake Sullivan. Yermak expressed confidence in Ukraine’s ability to make territorial gains, albeit slowly, U.S. and European officials said.

European and U.S. officials say they won’t push Ukraine to the negotiating table, nor, they said, would they work around Kyiv to cut a deal with Moscow.

—Vivian Salama, Gordon Lubold and Michael R. Gordon contributed to this article.

Write to Laurence Norman at laurence.norman@wsj.com and Bojan Pancevski at bojan.pancevski@wsj.com