Take (someone) by surprise

To startle someone, to surprise someone.

The sudden resignation of the mayor took everyone by surprise.