The gun module in World of Tanks as you should(I hope) know by now is not a solid object and the projectile is actually fired from just within the tank’s turret behind the gun. However, the gun module can soak up shells and counts as spaced armor as well as not being able to receive any HP damage unless a shell passes through it to hit a different piece of armor. Knowing this you can position your gun into an enemy gun and then when the enemy fires your gun module will “block” the shot. This will potentially damage/knock out your gun, do nothing to both you and the enemy, or cause a HE/HESH shell to explode close to the enemy and damage them significantly.
Aside from using that method at close range you can also implement the same idea at long ranges. Most guns have enough gun elevation or are long enough to block weak spots above the gun(mainly the cupolas on the top of tanks). Simply point your gun up between reloads or before an enemy fires at your weak spots on the top of your tank and try to keep it in between your weak spots and the enemy. Moving the gun a bit back and forth helps since in most situations it will not cover the entire weak spot but it will improve your chances. The worse things that could happen is either your gun gets damaged or you cause your enemy to spend a few extra seconds aiming. Both of those scenarios are better than taking a HP shot in a weak spot in my opinion. Keep in mind that tanks with good gun depression and/or long guns can also do the same thing with pointing down to hide some lower weak spots as well.