* Yellen says Fed to raise interest rates at an upcoming meeting
* Dollar, Treasury yields, bank stocks gain
* Bond proxy sectors, utilities and real estate, drop
* Apple hits record high; top stock on S&P, Nasdaq
* Indexes up: Dow 0.32 pct, S&P 0.30 pct, Nasdaq 0.26 pct (Updates to afternoon)
By Noel Randewich
Feb 14 (Reuters) - Major U.S. stock indexes hit record highs on Tuesday, led by bank stocks after Federal Reserve Chair Janet Yellen said it would be unwise to wait too long to raise interest rates.
Apple rose as much as 1.25 percent to an all-time high of $134.95, contributing to gains in the S&P 500, Dow Jones Industrial Average and Nasdaq Composite indexes.
Yellen said delaying rate hikes could force the U.S. central bank to raise rates quicker down the line, which could risk a recession. She also expressed uncertainty over economic policy under the Trump administration.
Banks, expected to gain from higher interest rates, led the market higher. Goldman Sachs rose 1.49 percent and Bank of America added 2.97 percent. The S&P 500 financial index rose 1.3 percent.
President Donald Trump's pro-business stance sparked a record-setting rally in stocks following his November election. However, he has given scant detail on his policies, leaving the Fed with limited visibility about the economy's future direction.
Speaking to the U.S. Senate Banking Committee, Yellen did not indicate whether the Fed still planned to raise rates three times this year, nor did she indicate whether a hike might come in March or in June, as most analysts expect.
"With the new president, there is still the uncertainty of the economic policy," said Jeff Carbone, co-founder of Cornerstone Financial Partners in Charlotte, North Carolina. "How much growth we get out of the market will affect policymaking and how quickly they need to react."
At 2:04 p.m. (1904 GMT), the Dow Jones Industrial Average was up 0.32 percent at 20,477.2, while the S&P 500 had gained 0.30 percent to 2,335.32, both reversing losses from earlier in the day.
The Nasdaq Composite added 0.26 percent to 5,778.93.
Yellen's comments lifted the dollar and U.S. Treasury yields.
Six of the 11 major S&P sectors were lower, led by the utilities and real estate sectors, which tend to fall when Treasury yields rise.
General Motors added 4.64 percent after Peugeot owner PSA Group said it is in talks to buy GM's European Opel business.
The prospects of sector consolidation caused Fiat to jump 4.84 percent, while Ford gained 0.84 percent.
Declining issues outnumbered advancing ones on the NYSE by a 1.12-to-1 ratio; on Nasdaq, a 1.19-to-1 ratio favored advancers.
The S&P 500 posted 57 new 52-week highs and no new lows; the Nasdaq Composite recorded 113 new highs and 16 new lows. (Additional reporting by Yashaswini Swamynathan in Bengaluru; Editing by James Dalgleish)