This is not really how things work.
We are talking about single particles of light having energies between ~ 50 GeV and up to 10 TeV (for this GRB, other sources go even higher).
At these energies, the atmosphere is completely opaque and the gamma rays are absorbed at around 20 km height.
However, the process kicks of a cascade of particles, the gamma ray is absorbed by creating an electron-positron pair, each with half the energy. These particles then create new gamma rays via bremsstrahlung and those gamma rays again are absorbed via pair production creating a cascade of high energy particles.
The charged part of this cascade (electrons and positrons) are moving faster than the speed of light in air and are thus producing Cherenkov radiation, which is in the UV to the visible range.
It is this light our telescopes detect and from this light we reconstruct the original properties of the first gamma ray that entered the atmosphere.