How is Earth protected from the gamma rays generated by the Sun? The Sun is generating energy by nuclear fusion. This nuclear fusion will emit energy in the form of gamma rays.
Normally, the earth's ozone layer filters the ultraviolet radiation while the earth's magnetic field deflects cosmic rays (charged particles).
But what kind of natural system protects us from the sun's gamma rays?

Note: As we know gamma rays can be blocked by denser materials like
several meters of thick lead (Pb).

 A: As you can read on wikipedia

Sun produces Gamma rays as a result of the nuclear fusion process,
  these super-high-energy photons are converted to lower-energy photons
  before they reach the Sun's surface and are emitted out into space. As
  a result, the Sun does not emit gamma rays. The Sun does, however,
  emit X-rays, ultraviolet, visible light, infrared, and even radio
  waves not to mention neutrinos.

Gamma ray photons produced by fission make their arduous journey to the surface of the Sun, they are continuously absorbed by the solar plasma and re-emitted to lower frequencies. By the time they get to the surface, their frequencies are mostly only within the IR/visible light/UV spectrum.
A: Actually, we don't need a lot of protection from solar gamma rays because they never reach us. Here's Wikipedia's take on the matter:

Although the Sun produces Gamma rays as a result of the nuclear fusion process, these super-high-energy photons are converted to lower-energy photons before they reach the Sun's surface and are emitted out into space. As a result, the Sun does not emit gamma rays.

So while lots of gamma rays can be formed during nuclear fusion, not many escape the Sun. We do have to worry about ultraviolet rays, but the ozone layer gives us a lot of help with that.
Note: NASA has a page that briefly discusses the Sun and gamma rays. There is an inaccuracy or two regarding Earth's magnetic field's ability to stop gamma rays (it can not), but it should prove helpful.
A: That's a good question and I think the answer may surprise you. It turns out that indeed, there's a lot of gamma ray radiation being produced in the sun's core from fusion reactions, so why are we not bombarded by gamma ray radiation? Those gamma ray photons need to escape from the sun's core, into the outer edge, and then finally from the surface. These photons are colliding with matter constantly, resulting in a photon diffusion process. It actually takes the average gamma ray photon about 170,000 years to diffuse out of the radiative zone. Once a gamma ray actually diffuses outward to the surface as a result of the constant collisions it has been converted into millions of visible wavelength photons.
more here:
Solar Core Wiki
A: The Earth's atmosphere stops most Gamma Rays. It is "as thick to gamma-rays as a twelve-foot thick plate of aluminum". 
The Gamma Rays that make it to our atmosphere and impact another particle are absorbed. Secondary particles are produced in this interaction, and these particles can be more penetrating and damaging. 
Source:
Gamma Rays and Our Atmosphere - Nasa.gov subdomain
