Investors became gloomy on Friday, threatening to derail a long winning streak for stocks, as inflation remained high.