I was under the impression that a gamma ray burst meant party over, not even roaches survive.
It depends on the burst, the proximity and the duration.
It could kill everyone ASAP, everything but the archaea a few hundred yards or more into the rock and deep-sea life, just falls over dead from the gamma rays, or pukes, twitches, and dies as all their ionized proteins and DNA kinda-sorta functions on pure momentum for a few minutes or hours.
Or it could be from far enough away, off-axis just enough, or weak enough just break down the ozone layer all at once, and UV radiation from our sun mucks things up for a long time, electronics would also be affected/ruined by it too. Major ecological SHTF, however I'd expect some plants and animals to survive. Although it would probably be starvation for most all humans.
There actually is record of a potential GRB event striking Earth at around AD 800 or so. Tree rings and other isotope data from ice cores show proportions of carbon-14 and beryllium-somethingorother that are normally produced by the constant low level of cosmic particle strikes on nitrogen in the upper atmosphere being way higher than background. A really bad solar flare could also account for it, but I think it didn't line up with the solar cycle so that makes the sun being the culprit unlikely.
Either way, it wasn't strong enough to cause any noticeable ecological damage beyond the isotope ratios that we had the tech to discover 1200 years later.
Either way, nothing would look burned or ashen everywhere like it did in the Road, there's no potential gamma burst sources close enough to give us that much gamma radiation or secondary thermal damage, unless the Sun itself managed to go gonzo in some unknown manner, and either way, there'd be nobody left to witness it. If it were bad enough to kill all surface plant life, even to the point no hardy weeds could at least spread and stave off erosion, I guess lots of mudslides/floods and dust storms would be possible. However the sky/clouds would be blue during the between times. And it would still be dirt-dirt, not ash-dirt everywhere.
Comet/asteroid or supervolcanism are the two things that could create the conditions in The Road. Although again, McCarthy didn't really care, the whole story being an analogy for various aspects of the "human condition".