* Goldman Sachs says 23 pct of U.S. refining capacity is shut
* Crude dips on expected fall in demand from refineries
* Gasoline hits more than two-year high
* API says U.S. crude inventories fell, EIA report due (Updates prices, adds detail on Port Arthur refinery)
LONDON, Aug 30 (Reuters) - Crude oil slid and gasoline futures hit their highest since mid-2015 on Wednesday as flooding and damage from Tropical Storm Harvey shut over a fifth of U.S. refineries, curbing demand for crude while raising the risk of fuel shortages.
Refineries with output of 4.1 million barrels per day (bpd) were offline on Tuesday, representing 23 percent of U.S. production, Goldman Sachs said. Restarting plants even under the best conditions can take a week or more.
"It will be a while before operations can return to normal and the U.S. refining industry is bracing itself for an extended shutdown," Stephen Brennock of oil broker PVM said.
Brent oil, the international benchmark for crude trading, was down 23 cents at $51.77 a barrel by 1051 GMT. U.S. crude fell 25 cents to $46.19.
In refined products, price movement was more dramatic and extended gains after sources on Wednesday said Total's Port Arthur, Texas, refinery was shut by a power outage resulting from the storm.
U.S. gasoline futures were up 5.5 percent at $1.8858, the highest since July 2015. Diesel futures advanced by 2.5 percent to $1.7076 a gallon, having touched their highest since January at $1.7097.
"Crude is always easier to replace than products," said Olivier Jakob, analyst at Petromatrix. "If the refineries stay shut for more than a week or 10 days, it's going to be very problematic."
Harvey made landfall on Friday as the most powerful hurricane to hit Texas in more than 50 years, resulting in the death of at least 17 people.
In addition to shutting oil refineries, about 1.4 million bpd of U.S. crude production has been disrupted, equivalent to 15 percent of total output, Goldman Sachs said.
The impact of the storm overshadowed the latest weekly figures on U.S. oil supplies from the American Petroleum Institute (API).
U.S. crude inventories fell by 5.78 million barrels last week, the API industry group reported on Tuesday, suggesting a gradual tightening of the U.S. oil market. The figures, however, do not reflect the impact from Harvey.
Traders are awaiting the latest U.S. government inventory report, due at 1430 GMT from the Energy Information Administration, to compare with the API figures.
(Additional reporting by Henning Gloystein; Editing by Dale Hudson and Susan Fenton)