NEW YORK—Gold soared above $1,700 a troy ounce as investors scrambled to shed riskier holdings in the wake of a U.S. credit-rating downgrade.

Standard & Poor's cut its rating on U.S. debt to double-A-plus after markets closed Friday, citing weeks of political stalemate that underscore weak leadership in the face of escalating fiscal challenges.

Gold,...