By Tatyana Shumsky 

NEW YORK--Gold prices rose Friday as investors continued to weigh the timing of a potential increase in U.S. interest rates.

The most actively traded contract, for April delivery, was recently up $5.10, or 0.4%, at $1,215.20 a troy ounce on the Comex division of the New York Mercantile Exchange.

Prices have moved higher in recent days, after Federal Reserve Chairwoman Janet Yellen told lawmakers that the central bank is closer to raising interest rates, but that such a move remains dependent on U.S. economic data. Ms. Yellen, in testimony to Congress on Tuesday and Wednesday, said wage growth and inflation must climb before rates can be raised, even though the labor market has shown signs of improvement.

"The continued indication that the Fed's not going to be quick to move has put a bid back into the market, but that will evaporate the moment that sentiment changes," said Frank McGhee, head precious metals dealer with Integrated Brokerage Services LLC in Chicago.

Gold doesn't earn interest or dividends and is expected to struggle to attract investors away from haven assets like Treasury bonds when rates are climbing.

Gold traders also breathed a little easier after German lawmakers approved a four-month extension of Greece's bailout in a vote in the lower house of parliament on Friday.

"It means that some of the Greek banks won't have to sell gold to raise cash," said George Gero, a senior vice president with RBC Capital Markets Global Futures. Some investors worried that without the extension, Greek banks would be cut off from borrowing funds from the European Central Bank and would instead sell their gold holdings, Mr. Gero said.

Write to Tatyana Shumsky at tatyana.shumsky@wsj.com