For any photon you can calculate it's energy with the formula $E = h \nu$, where $h \simeq 6.626 \times 10^{-34}\:\mbox{J s}$ is Planck constant and $\nu$ the frequency of the photon.
At the same time you can crudely convert energy to temperature with $E = k_B T$, where $k_B \simeq 1.381 \times 10^{-23}\:\mbox{J/K} = 8.617 \times 10^{-5}\:\mbox{eV/K}$ is Boltzmann constant.
This means that $T = \frac{E}{k_B} = \frac{1 \times 10^6\:\mbox{eV}}{8.617 \times 10^{-5}\:\mbox{eV/K}} \simeq 1.16 \times 10^{10}\:\mbox{K}$, i.e. 10 billions Kelvin (or degrees Celsius, at this point the difference is irrelevant) in one single point. If you distribute that energy over a larger radius, you'll have your "fireball", although at these temperatures speaking of fire may be misleading.
A gamma ray burst could completely wipe out the atmosphere if it happens near enough. Fortunately the sources of such powerful events are also distant enough to not have any direct consequence on us.