Field promotions, like the one Kirk received from Pike, are common during battle/wartime. Considering all the Starships that were destroyed, and all the Starfleet officers that were killed by Nero's ship, and Kirk's heroic performance in rescuing Pike and defeating Nero, it isnt ridiculous at all...
Eeehh, it kinda is. Considering he didn't even graduate from the Academy, that is.
25-year old Captains aren't unheard of IRL, though.