* Goldman Sachs says 23 pct of U.S. refining capacity is off
* Crude prices dip as refinery outages seen to curb demand
* Gasoline prices hit over 2-year high on refinery outages
* NHC warns of more "life-threatening flooding" (Adds Goldman Sachs refinery closure estimate in paragraphs 7 and 8, updates prices)
SINGAPORE, Aug 30 (Reuters) - Oil prices slid on Wednesday but gasoline spiked to its highest since mid-2015 as flooding and storm damage in the wake of Hurricane Harvey knocked out almost a quarter of U.S. refineries, crimping demand for crude but raising fears of fuel shortages.
Hurricane Harvey, which has been downgraded to a storm, has caused massive floods across coastal Texas, including in Houston. It is now moving into Louisiana, where more floods are expected.
"Catastrophic and life-threatening flooding continues in southeastern Texas and portions of southwestern Louisiana," the National Hurricane Center (NHC) said in its latest note.
U.S. West Texas Intermediate (WTI) crude futures were at $46.31 per barrel at 0522 GMT, down 13 cents from their last close. Brent crude futures were down 21 cents, at $51.79 a barrel.
In the refined product market, price movements have been more dramatic.
U.S. gasoline prices were over 3 percent higher at $1.8396 per gallon. Prices earlier climbed to the most since July 31, 2015, at $1.842. Diesel futures also jumped, gaining 1.2 percent to $1.6854 a barrel and were earlier at their highest since Jan. 9 at $1.697.
"As of August 29, we estimate U.S. refining production offline was 4.1 million barrels per day (bpd); this represents 23 percent of total U.S. refining production," Goldman Sachs said in a note to clients.
Goldman also said around 1.4 million bpd of crude production was disrupted, equivalent to 15 percent of total U.S. output.
The NHC said the next 24 hours would remain dangerous.
"There is a danger of life-threatening inundation, from rising water moving inland from the coastline, during the next 12 to 24 hours," the NHC said, adding that 6 to 12 inches of rain could fall in far east Texas and southwestern Louisiana.
The largest refinery in the United States, Motiva Enterprises' 603,000 barrel-per-day (bpd) plant in Port Arthur, Texas, was shutting down on Tuesday night because of flooding.
"Severe flooding due to tropical storm Harvey is affecting refinery capacity and therefore crude demand," ANZ bank said.
Preparing for more rain and floods, Total cut production in half at its 225,500 bpd refinery, also in Port Arthur.
Restarting plants even under good conditions can take weeks.
Beyond the impact of Harvey, the American Petroleum Institute (API) said on Tuesday that U.S. crude inventories fell by 5.780 million barrels last week, an indicator that the U.S. oil market is gradually tightening.
The figures, however, do not reflect the impact from Harvey. Government data for last week is due to be published by the Energy Information Administration (EIA) later on Wednesday.
Traders said that EIA data would take weeks to fully reflect the impact of the storm and floods.
(Reporting by Henning Gloystein; Editing by Christian Schmollinger and Tom Hogue)