 Gain: gain is define as the ratio of max radiation. Intensity in a given direction  to the max radiation intensity from the reference antenna produced in the same direction with same power input.
 Gain=max radiation intensity from test antenna/max radiation intensity from reference antenna with same power input 
 Directivity: The max directivity gain is called as directivity of an antenna. We can defined directivity of antenna as follows. It is the ratio of max radiotion intensity to  its average raiotion intensity.
 directivity= max radiation intensity from test antenna/average radiation intensity of test antenna