As the U.S. emerged from recession in the summer of 2009, Janet Yellen, then president of the Federal Reserve Bank of San Francisco, took a grim view of the economy's prospects.

"I expect the pace of the recovery will be frustratingly slow," she said in a San Francisco speech. A month later, addressing fears that money flooding into the economy from the Federal Reserve would stoke inflation, Ms. Yellen said not to worry in...