The Enterprise has mere minutes to hit warp speed, or the Genesis device will kill them all.
Spock, bright fellow that he is, figures out that someone needs to be exposed to toxic levels of radiation in order to restore the engines and let the ship get away…and that he's the only one with both the physical strength and technical know-how to do the job.
He excuses himself and moseys on down to the engine room, where McCoy tells him he can't go into the core. Silly McCoy.
One Vulcan nerve pinch later (plus a freaky fingers-to-the-cheek- thing that gives the filmmakers some wiggle room in the event they want to bring him back), Spock enters the engine core to fix the damage components.