Shares of technology and financial stocks slumped Tuesday, pushing major indexes down for the fourth time in the past five trading days.

The declines extended a spring rout in sectors that up until recently had been significant beneficiaries of a roaring rally that began in the hours after Donald Trump was elected as president.

Bank shares...