ANN ARBOR, Mich.—Federal Reserve Chairwoman Janet Yellen indicated Monday that the era of extremely stimulative monetary policy was coming to an end.

In a public discussion at the University of Michigan, Ms. Yellen said the Fed was moving away from its efforts to revive a recession-scarred economy and focusing instead on maintaining the gains of the past few years. That will change the central bank’s policy-making stance, she said, noting that Fed officials plan to continue gradually raising interest rates unless the economy...