The torque generated by the transfer of spin angular momentum from a spin-polarized current to a nanoscale ferromagnet can switch the orientation of the nanomagnet much more efficiently than a current-generated magnetic field, and is therefore in development for use in next-generation magnetic random access memory (MRAM). Up to now, only DC currents and square-wave current pulses have been investigated in spin-torque switching experiments. Here we present measurements showing that spin transfer from a microwave-frequency pulse can produce a resonant excitation of a nanomagnet and lead to improved switching characteristics in combination with a square current pulse. With the assistance of a microwave-frequency pulse, the switching time is reduced and achieves a narrower distribution than when driven by a square current pulse alone, and this can permit significant reductions in the integrated power required for switching. Resonantly excited switching may also enable alternative, more compact MRAM circuit architectures.