Goldman Sachs Group Inc. is on the defensive in Venezuela after it bought bonds that had been held by the struggling country’s central bank in a transaction the government’s opposition decried as a lifeline to President Nicolás Maduro’s embattled administration.

Goldman’s purchase of $2.8 billion in bonds, first reported by The Wall Street Journal on Sunday, comes as Mr. Maduro’s detractors have recently pleaded with international financial institutions to avoid any transactions that might help a government accused of human-rights...