(This is based on a question that just came to me via email; I've added some context from a previous brief conversation with the same person.)

Last year I was told that the gamma distribution is heavier tailed than the lognormal, and I've since been told that's not the case.


Which is heavier tailed?
What are some resources I can use to explore the relationship?


The (right) tail of a distribution describes its behavior at large values.  The correct object to study is not its density--which in many practical cases does not exist--but rather its distribution function $F$.  More specifically, because $F$ must rise asymptotically to $1$ for large arguments $x$ (by the Law of Total Probability), we are interested in how rapidly it approaches that asymptote: we need to investigate the behavior of its survival function $1- F(x)$ as $x \to \infty$.
Specifically, one distribution $F$ for a random variable $X$ is "heavier" than another one $G$ provided that eventually $F$ has more probability at large values than $G$.  This can be formalized: there must exist a finite number $x_0$ such that for all $x \gt x_0$, $${\Pr}_F(X\gt x) = 1 - F(x) \gt 1 - G(x) = {\Pr}_G(X\gt x).$$

The red curve in this figure is the survival function for a Poisson$(3)$ distribution.  The blue curve is for a Gamma$(3)$ distribution, which has the same variance.  Eventually the blue curve always exceeds the red curve, showing that this Gamma distribution has a heavier tail than this Poisson distribution.  These distributions cannot readily be compared using densities, because the Poisson distribution has no density.
It is true that when the densities $f$ and $g$ exist and $f(x) \gt g(x)$ for $x \gt x_0$ then $F$ is heavier-tailed than $G$.  However, the converse is false--and this is a compelling reason to base the definition of tail heaviness on survival functions rather than densities, even if often the analysis of tails may be more easily carried out using the densities.
Counter-examples can be constructed by taking a discrete distribution $H$ of positive unbounded support that nevertheless is no heavier-tailed than $G$ (discretizing $G$ will do the trick).  Turn this into a continuous distribution by replacing the probability mass of $H$ at each of its support points $k$, written $h(k)$, by (say) a scaled Beta$(2,2)$ distribution with support on a suitable interval $[k-\varepsilon(k), k+\varepsilon(k)]$ and weighted by $h(k)$.  Given a small positive number $\delta,$ choose $\varepsilon(k)$ sufficiently small to ensure that the peak density of this scaled Beta distribution exceeds $f(k)/\delta$.  By construction, the mixture $\delta H + (1-\delta )G$ is a continuous distribution $G^\prime$ whose tail looks like that of $G$ (it is uniformly a tiny bit lower by an amount $\delta$) but has spikes in its density at the support of $H$ and all those spikes have points where they exceed the density of $f$.  Thus $G^\prime$ is lighter-tailed than $F$ but no matter how far out in the tail we go there will be points where its density exceeds that of $F$.

The red curve is the PDF of a Gamma distribution $G$, the gold curve is the PDF of a lognormal distribution $F$, and the blue curve (with spikes) is the PDF of a mixture $G^\prime$ constructed as in the counterexample. (Notice the logarithmic density axis.) The survival function of $G^\prime$ is close to that of a Gamma distribution (with rapidly decaying wiggles): it will eventually grow less than that of $F$, even though its PDF will always spike above that of $F$ no matter how far out into the tails we look.

Discussion
Incidentally, we can perform this analysis directly on the survival functions of lognormal and Gamma distributions, expanding them around $x=\infty$ to find their asymptotic behavior, and conclude that all lognormals have heavier tails than all Gammas.  But, because these distributions have "nice" densities, the analysis is more easily carried out by showing that for sufficiently large $x$, a lognormal density exceeds a Gamma density.  Let us not, however, confuse this analytical convenience with the meaning of a heavy tail.
Similarly, although higher moments and their variants (such as skewness and kurtosis) say a little about the tails, they do not provide sufficient information.  As a simple example, we may truncate any lognormal distribution at such a large value that any given number of its moments will scarcely change--but in so doing we will have removed its tail entirely, making it lighter-tailed than any distribution with unbounded support (such as a Gamma).
A fair objection to these mathematical contortions would be to point out that behavior so far out in the tail has no practical application, because nobody would ever believe that any distributional model will be valid at such extreme (perhaps physically unattainable) values.  That shows, however, that in applications we ought to take some care to identify which portion of the tail is of concern and analyze it accordingly.  (Flood recurrence times, for instance, can be understood in this sense: 10-year floods, 100-year floods, and 1000-year floods characterize particular sections of the tail of the flood distribution.)  The same principles apply, though: the fundamental object of analysis here is the distribution function and not its density.
