A gamma ray burst could cause an extinction event. There is no evidence that this has ever happened to the Earth.
Gamma ray bursts are rare events, we don't know exactly how rare, but to cause a mass extinction a GRB would need to be near (6000 light years or less is near in this context) and pointed right at Earth. GRBs are rare enough for it to be possible that this has never happened. It is possible that one or two of the extinctions in the last billion years were due to GRBs
The mass extinction that is most likely to have been caused by a GRB is the Orodvician-Silurian Event, 444 million years ago. There is no positive evidence of a GRB, but it can't be excluded. The best that can be said is that the pattern of extinction is consistent with a GRB.
A gamma ray burst would leave few signs that could be used to prove it occurred. The radiation would strip the ozone layer, leaving the surface vulnerable to UV radiation. But it wouldn't leave a crater, or a geological layer.
Gamma ray bursts can occur when a hypernova occurs. There is no reason to think that the Earth is more vulnerable to a hypernova when it is in the galatic plane. The evidence of a 26 million year periodicity to mass extinctions is weak, and there is no evidence that closely ties this to the sun's orbit around the milky way. There is good reason to tie other extinctions to particular impacts, for example there is no need to hypothesise that a GRB occurred 65 million years ago, at the K-T mass extinction
Gamma ray bursts are one of the less likely causes of a mass extinction. Researcher David Thompson likens them to the danger of finding a polar bear in his closet. It could happen; it would be dangerous, but the chance of it happening is so low that it is not a risk worth worrying about.