OMAHA, Neb.—Warren Buffett, long a critic of the excesses of Wall Street and the risks of derivatives, is emerging as a stalwart defender of the financial system.

At Berkshire Hathaway Inc.'s annual meeting here this weekend, the legendary investor mounted a vigorous defense of Goldman Sachs Group Inc., sued for civil fraud by regulators and under assault by Congress for its business dealings. And he praised the business model of Moody's Corp., whose ratings agency has been lambasted as too cozy with bankers.

Though...