* S&P 500 futures down after Sunderland results
* Opinion poll puts "remain" campaign in lead
* Banks climb after Fed gives passing grade in stress tests
* Indexes up: Dow 1.3 pct, S&P 1.3 pct, Nasdaq 1.6 pct (Adds detail on futures, bank shares, comment)
By Noel Randewich
June 23 (Reuters) - U.S. stock index futures fell in after-hours trading on Thursday after vote counts showed a tight race in Britain's referendum over whether to stay in the European Union.
S&P E-mini futures fell 0.15 percent after the vote count in the northeastern city of Sunderland showed a stronger-than-expected vote in favor of taking Britain out of the European Union.
Sterling fell as low as $1.4351 against the dollar, more than wiping out all its gains that had lifted it above $1.50 for the first time this year on the back of an earlier YouGov opinion poll that suggested Britons had voted 52-48 percent to stay in the EU.
Earlier on Thursday, U.S. investors bet the United Kingdom would remain part of the European Union, potentially avoiding damage to European trade and its consequences for the global economy.
"The Sunderland result has definitely altered the tone of the evening and markets are getting very choppy," wrote ETX Capital's head of trading Joe Rundle in a research note.
In extended trade, Goldman Sachs Group added 1.17 percent and Bank of America climbed 1.5 percent after the Federal Reserve said all 33 stress tested U.S. banks met minimal capital requirements.
Earlier, the Dow Jones Industrial Average rallied 1.29 percent to end at 18,011.07 points, its highest level since late April.
The S&P 500 surged 1.34 percent to 2,113.32, just 0.8 percent short of its record closing high hit in May last year.
The Nasdaq Composite added 1.59 percent to 4,910.04.
The financial sector led the S&P 500 stock index with a 2.1 percent gain.
With investors optimistic about a victory for Britain's "Remain" campaign, the CBOE Volatility index fell 18.5 percent, its largest daily percentage decline since October 2013.
Software maker Twilio Inc nearly doubled in its market debut, rising as high as $29.60 after pricing at $15. It closed up 91.9 percent at $28.79.
About 6.4 billion shares changed hands in U.S. exchanges, below the 6.8 billion average over the past 20 sessions.
Advancing issues outnumbered declining ones on the NYSE by a ratio of 4.98-to-1 and on the Nasdaq, a 3.57-to-1 ratio favored advancers.
The S&P 500 posted 52 new 52-week highs and 2 new lows; the Nasdaq recorded 88 new highs and 26 new lows. (Additional reporting by Richard Leong and Rodrigo Campos; Editing by Cynthia Osterman)