(Updates with afternoon U.S. markets' activity)
* Dollar rises after recent losses; sterling edges lower
* S&P and Dow fall as energy weighs
* Gold falls as dollar recovers
By Caroline Valetkevitch
NEW YORK, April 19 (Reuters) - Oil prices dropped more than 3 percent on Wednesday following a surprise increase in gasoline inventories, and declines in energy shares weighed on U.S. stocks.
The dollar recovered from recent weakness against the euro and the safe-haven yen, and sterling was off six-month highs, which it hit after Tuesday's calling of a snap UK election.
In the oil market, the counter-seasonal build of 1.5 million barrels in gasoline in the latest week, along with an increase in U.S. production, pressured prices.
Brent crude futures were down 3.6 percent at $52.89, while U.S. crude futures fell 3.8 percent to settle at $50.44.
The oil losses hurt shares of U.S. energy companies, pushing the S&P 500 energy index down 1.4 percent and helping the benchmark index to reverse earlier gains.
"Crude broke $52 on WTI, that is the strongest correlation we have right now away from the case-by-case earnings we have," said Art Hogan, chief market strategist at Wunderlich Securities in New York.
The Dow Jones Industrial Average was down 104.72 points, or 0.51 percent, to 20,418.56, the S&P 500 lost 3.27 points, or 0.14 percent, to 2,338.92 and the Nasdaq Composite added 17.11 points, or 0.29 percent, to 5,866.58.
Limiting losses were upbeat earnings from Morgan Stanley and others.
Questions still hung over the 'reflation' trades that had lifted markets since Donald Trump became U.S. president. A run of disappointing U.S. economic data and doubts the Trump administration will progress with tax cuts have quelled expectations of faster inflation.
The pan-European STOXX 600 index, which hit a three-week low on Tuesday, ended up 0.2 percent, while Britain's FTSE 100 index fell 0.5 percent.
British stocks are vulnerable to a rising pound because more than two-thirds of FTSE 100 company earnings are derived from operations overseas.
Sterling was just off a six-month peak against the dollar above $1.28 having surged when British Prime Minister Theresa May called an early general election for June 8, seeking to strengthen her party's majority ahead of Brexit negotiations.
The greenback was 0.3 percent higher against the yen and up 0.1 percent against the euro.
Four days before the first round of the presidential election in France, just a few points separate the top four candidates, including two who oppose the euro - the far-right's Marine Le Pen and the far-left's Jean-Luc Melenchon.
In the U.S. Treasury market, 10-year notes were down 6/32 in price to yield 2.20 percent.
Gold slipped as the dollar gained, with spot gold falling as low as $1,275.73 per ounce.
Additional reporting by Jamie McGeever in London and Chuck Mikolajczak and Julia Simon in New York; Editing by Hugh Lawson and Nick Zieminski