I touched a tree that was touching an electric fence and got an electric shock. How is this possible if wood is an insulator? I touched a tree that was touching an electric fence and got an electric shock. How was this possible if wood is an insulator?
The tree wasn't wet either, and it was a pretty strong shock too.
 A: Trees are not as good an insulator as you might think. This source suggests a typical conductivity of living tree sap is 0.01 S/m with a relative permittivity of 80. So not an insulator, though a poor conductor. Typical advice when using electric fencing is that you do not use wooden posts! Presumably because wet wood is also conductive to some extent.
In any case, all that is required is that the tree acquired an electric potential and that you were more resistive than the path between the fence and you through the tree. It's the "volts that jolt". The current flow through the tree and you, would have been very small.
I would expect that the jolt would be maximised if you touched the tree near where it touched the fence or at least at the same height as where it touched the fence - thus minimising the resistance along the path to you.
EDIT: Oven dried wood has a conductivity of $\sim 10^{-15}$ S/m (i.e. 13 orders of magnitude lower), so it would be fair enough to call that an insulator for most practical purposes.
A: "Wood is an insulator" is a very broad statement. In fact it's wrong. "Wood is not a good conductor" would be a more accurate statement, but moisture in a living tree would easily carry enough current to give you a shock and have enough resistance not to trip out the breaker/discharge the battery powering the fence.
A: Although dry wood is a relative "good" insulator, a tree is not a good insulator  because of the sap/water inside it.  Most likely you touched the tree at about the same height as the fence.  If the tree has about a 10" diameter, you might have the equivalent of 2" of insulation (and 8" of water), that means most of the voltage will be dropped across you (specially if you are barefooted).   
A: There is no such perfect insulator. Depending on conductivity materials are loosely classified as conductors, semiconductors and insulators. As Potential difference between two points in the medium increases the material begin to conduct at some point. The nature of the material also crucial here. If it contain ions then charges easily flows. Hence the materials which are normally non conductor may turn into conductor. Air is not a good conductor. But during lightning even air conductos. Wearing shoes and gloves touching the live electric wire is dangerous as they may conduct depending on voltage.  
