Gorenstein varieties: why the two definitions are equivalent? There are two definitions of Gorenstein singularities
in the literature. Using Grothendieck's (or Serre's) duality, one
defines the "dualizing sheaf" an object $\hat K_M$ of derived category
of coherent sheaves such that $H^n(\hat K_M)=C$ and the multiplication
$$
H^i(M, B) \times H^{n-i}(RHom^*(B, \hat K_M))\to
H^n(\hat K_M)=C
$$
defines a perfect pairing on the cohomology.
Then $M$ is Gorenstein if $\hat K_M$ is a line bundle.
This is the definition used in Hartshorne,
Wikipedia, Stacks Project, Kollar-Mori and so on.
This is a stronger form of Cauhen-Macaulay property, which
assumes that the complex of sheaves $\hat K_M$ is a coherent
sheaf, that is, a complex of coherent sheaves
quasi-isomorphic to a complex concentrated
in one degree.
In their book "Toric varieties"
Cox, Little and Schenck define a Gorenstein variety
as the one with Cartier canonical bundle. The canonical
bundle of a normal variety is defined as the reflexization
of the sheaf of top-degree differential forms.
In particular, this implies the Gorenstein property
for all normal varieties with trivial canonical bundle
outside of singularities. This definition is used
in some other papers on toric geometry, and in
papers on Sasakian geometry, for example
Gauntlett, Martelli,  Sparks, Yau
"Obstructions to the Existence of
Sasaki-Einstein Metrics".
Curiously enough, Cox, Little and Schenck
use the usual definition of Cohen-Macaulay singularities (in another chapter)
and never mention that Gorenstein singularities are a special case of Cohen-Macaulay.
They also say (when defining the Gorenstein singularities) that there are other definitions around, and give a reference to Hartshorne. I suppose that they meant
to say that their definition is equivalent to the standard, in particular, implies
the Cohen-Macaulay property, but they never claim or prove it, as far as I can see.
I want a reference to the equivalence of these
two notions.  I think I have a vague idea how to
prove it, but I am sure it is written up somewhere,
maybe not in full generality (I need it only for
isolated canonical singularities anyway).
 A: I would say that definition of Gorenstein given in Hartshorne etc. is the correct one; it certainly doesn't require normality. For example, a singular plane curve is Gorenstein in this sense, but not in the second "CLS" sense. However, if $M$ is Cohen-Macaulay and normal, then the  dualizing sheaf agrees with the canonical sheaf as defined in your second paragraph, i.e. $(\Omega_M^{\dim M})^{**}$. Under these assumptions, the two definitions of Gorenstein agree.   It's conceivable that there may exist a normal variety satisfying the second version of Gorenstein and not the first. I don't have a counterexample.
(I will try to dig up some references later.)
A: As Donu mentioned, Gorenstein can be defined as Cohen-Macaulay and such that the canonical=dualizing sheaf is a line bundle. The point is that the dualizing complex is quasi-isomorphic to a sheaf if and only if the underlying scheme is Cohen-Macaulay and then that sheaf is isomorphic to the canonical sheaf. Being normal is actually not a requirement. Any plane curve is Gorenstein. An interesting simple example of a CM but not Gorenstein scheme is the union of three lines intersecting in a single point that do not lie in a single plane. Then you can project this to a plane so that it is an isomorphism on each line, but not on the union even though it is a 1-1 map. (It is not an isomorphism, because the image is Gorenstein)
There are many examples of singularities that have a trivial canonical sheaf but which are not CM and hence not Gorenstein. Perhaps the simplest is a cone over an abelian variety of dimension at least 2. The cone minus the vertex is an affine bundle over the abelian variety and hence has a trivial canonical sheaf and hence so is the canonical sheaf of the cone (The canonical sheaf is always $S_2$, so it is determined in codimension $1$). The reason it is not CM is that the middle cohomologies of the structure sheaf of the abelian variety will make the local cohomology modules  non-zero at the vertex starting at $i=2$ pushing the depth down to $2$. (This is why you need the assumption on the dimension; if the abelian variety is a curve, then the cone is a surface, so depth $2$ is still CM).
