TAIPEI—Terry Gou, the billionaire founder of tech giant Foxconn, on Friday withdrew from the race to be Taiwan’s next president, bringing a sense of relief to the major Apple supplier and iPhone manufacturer, sources said. Gou announced his bid in August,