Goldman Sachs Group Inc. has backed skyscrapers and movie studios. But its big winner lately is a once-sleepy credit bureau.

Goldman bought TransUnion , the smallest of the three main credit-reporting firms, in 2012. By the time it went public three years later, TransUnion had become a data-mining machine, gathering billions of seemingly insignificant tidbits about ordinary Americans that it analyzed and sold to lenders, insurers and others.

Goldman has already pocketed nearly $600 million in profit and is expected to make about five times its initial $550 million investment.

The windfall shows the benefit of Goldman’s decision to stick with private-equity investing after the financial crisis. Most big banks exited this activity as regulation stiffened. But Goldman, which has merchant banking deep in its DNA, stayed put and is even raising a new fund, its first since 2007, to buy companies.

Despite some ​duds—Goldman ​backed a Texas utility​ that later went bankrupt​ in one of the biggest buyout flops of all time—private-equity investing has been a moneymaker in recent years. Goldman has invested in a Japanese theme park, a U.S. network of home contractors and a Danish outsourcing company.