* Economy to bounce back in 2025 if Gaza war contained

* Crowds returning to shopping malls, restaurants

* Demand is recovering, bank economist says

* War initially brought economy to a standstill

JERUSALEM, Feb 14 (Reuters) - Israel's economy is taking a hit after more than four months of war with Hamas, but the economy looks set to grow slightly this year before rebounding in 2025 as long as the conflict stays contained to Gaza.

Israel's $500 billion economy had been humming along and was expected to grow around 3.5% last year, but after gunmen from Palestinian Islamist group Hamas attacked on Oct. 7, the economy came to a standstill. Israelis stopped spending and travelling, hundreds of thousands were called up into reserve military duty in one of the largest troop mobilizations Israel has ever seen and thousands of Palestinian workers were laid off.

Preliminary data on economic activity in the fourth quarter are due on Monday at 1 pm (1100 GMT) and economists expect a double digit contraction due to declines in consumer spending, investment in areas such as construction - where half of building sites are idle since the government has not yet allowed the return of Palestinian workers - and in service exports.

Consumer confidence stands at levels not seen since the COVID-19 pandemic in 2020, while the annual inflation rate has eased back down to 3%, prompting a Bank of Israel rate reduction of a quarter-point in January.

At the outset of the war, most private spending was just on essential goods like food, while Israelis were not in any mood to travel for leisure, or go to movies or shows.

Now, even as fighting continues in Gaza, thousands of reservists have been sent home and crowds have returned to the shopping malls and restaurants that were shut down at the start of the war.

"It seems like the economy is coming back," said Bank Leumi chief economist Gil Bufman. He pointed to real-time data such as credit card purchases that indicate "demand is coming back" following a "terrible month" in October, before stabilizing in November and improving in December.

'ECONOMY IS RESILIENT'

Economic growth in 2023 is estimated at around 2% with projections for 2024 between 0.5% and 2% - helped by high state spending - before expanding more rapidly in 2025.

The slowdown in 2023 that came amid a global downturn followed robust post-pandemic economic growth of 9.3% in 2021 and 6.5% in 2022. The expansion was led by the high-tech sector that accounts for 17% of economic output, 12% of jobs and 56% of exports.

"We did not encounter a fundamental problem in the economy. To the contrary. The economy is resilient," Avi Simhon, Prime Minister Benjamin Netanyahu's chief economic adviser, told Reuters. He cited stronger than expected tax income in January that helped lead to a monthly budget surplus.

Ratings agency Moody's last week downgraded Israel's credit rating to A2 from A1 due to elevated political risks and weaker public finances stemming from the war. But, it noted, the economy itself "has managed the fall-out from the conflict reasonably well" with some indicators pointing to a swift rebound and the labour force is approaching pre-war levels.

It cautioned, though, that should the conflict spread to include Hezbollah in Lebanon - where both sides trade cross-border fire daily - the "negative economic impact would spread to more sectors and be longer-lasting."

If the war remains contained, and ends soon, a sharp rebound is forecast for 2025. Bufman sees a 5.5% expansion while the central bank projects 5%.

"The Israeli economy is rooted on strong and healthy economic fundamentals, and is a world leader in the fields of innovation and technology," said Bank of Israel Governor Amir Yaron this week.

He said economic rebounds had followed the Palestinian uprising in the early 2000s, the second Lebanon war in 2006 and conflicts with Hamas militants in Gaza in 2008, 2012, 2014 and 2021.

This, Leumi's Bufman said, is because growth drivers remain - including rapid population growth of 2% a year, Israel's natural gas production, high levels of research and development and a highly skilled workforce able to work from home and bolster the services sector.

"We went through a very difficult period in the fourth quarter with all the things that happened, but it does seem like things are coming back," Bufman said. (Reporting by Steven Scheer, Editing by William Maclean)