While directivity is the ratio of power in a particular direction vs total power radiated, gain is a similar ratio but instead of total power radiated, the denominator is the total power delivered to the antenna. So, the difference between the two terms is that power gain takes into account the losses in the antenna plus the mismatch losses at the interface between the antenna and the transmission line, while directivity does not. If there are no losses and the match between antenna and feedline is perfect, then directivity equals gain. In practical cases the gain is always less than the directivity because there are always some degree of losses.
Both power gain and directivity are a function of direction, but convention says that if there is no direction stated, then the gain or directivity figure given is that in the direction of maximum gain. For clarification, this is sometimes stated as the peak directivity or peak gain. If a direction is stated, then there is no ambiguity.