Equivalent definition of maximal Cohen-Macaulay modules over a Gorenstein local ring 
  $
    \newcommand{\Ext}{\mathop{\rm Ext}\nolimits}
    \newcommand{\depth}{\mathop{\rm depth}\nolimits}
    \newcommand{\dim}{\mathop{\rm dim}\nolimits}
  $


A module $M$ is a maximal Cohen-Macaulay module over the ring $R$ if $\depth M = \dim R$, where $\dim R$ denotes the Krull dimension of $R$. I've been told that if $R$ is a Gorenstein local ring, then $M$ is a maximal Cohen-Macaulay module if and only if $\Ext^i(M,R)=0$ for all $i \geq 1$. (This is taken as the definition here: https://mathoverflow.net/questions/214626/showing-that-the-stable-module-category-of-a-ring-r-restricted-to-maximal-cohe)
How can this be proved? And does anyone have a source where this has been proved? Is it true for Gorenstein local rings only, or also for Gorenstein (not necessarily local) rings too? 
I primarily work with commutative rings and finitely generated modules. 
 A: Old question, but here is an answer anyway. 
For the first, part, namely the case of a commutative local Cohen-Macaulay ring, one can use local duality:
if $R$ is a Cohen-Macaulay local ring admitting a canonical module $\omega$ then for any finitely generated $R$-module there are isomorphisms
$$\text{Ext}_{R}^{i}(M,\omega)^{\wedge}\simeq \text{Hom}_{R}(H_{\mathfrak{m}}^{d-i}(M),E(k)).$$ 
In particular
$$
\begin{align}
M \text{ is MCM} &\iff H_{\mathfrak{m}}^{d-i}(M)=0 \text{ for all }i>0
\\
&\iff \text{Hom}_{R}(H_{\mathfrak{m}}^{d-i}(M),E(k))=0 \text{ for all }i>0 \text{  (as $E(k)$ is an injective cogenerator})
\\
&\iff  \text{Ext}_{R}^{i}(M,\omega)^{\wedge}=0 \text{ for all $i>0$ (by local duality)}
\\
&\iff \text{Ext}_{R}^{i}(M,\omega)=0 \text{ for all $i>0$}
\end{align}
$$
where the last if and only if follows from the fact that $\text{Ext}_{R}^{i}(M,\omega)$ is a finitely generated $R$-module and the map $R\rightarrow \hat{R}$ is faithfully flat.
Since $R$ is Gorenstein if and only if $R\simeq \omega$, and the definition given on the Mathoverflow page is equivalent.
For the more general case, one does not have maximal Cohen-Macaulay modules, so a suitable replacement class is needed. Over any ring, one can define Gorenstein projective modules:

Definition
  Let $R$ be a ring. An $R$-module $M$ is Gorenstein projective if there is an exact complex $\mathbf{P}^{\bullet}$ of projective $R$-modules such that $M= \text{Ker}(\mathbf{P}^{0}\rightarrow \mathbf{P}^{1})$ and $\text{Hom}_{R}(\mathbf{P}^{\bullet},P)$ is exact for any projective $R$-module $P$

While this definition is not the most accessible, this class of modules has good properties over certain classes of ring:

Lemma
  Let $R$ be a Cohen-Macaulay local ring. Then every finitely generated Gorenstein projective module is MCM. If $R$ is a Gorenstein local ring, then every MCM is a finitely generated Gorenstein projective module.

Over a not-necessarily commutative Gorenstein ring much more can be said; here is the relevant part for finitely generated modules

Lemma
  Let $R$ be a Gorenstein ring. Then a finitely generated module $M$ is Gorenstein projective if and only if $M$ is reflexive with respect to $(-)^{*}=\text{Hom}_{R}(-,R)$ and 
  $$\text{Ext}_{R}^{i}(M,R)=\text{Ext}_{R}^{i}(M^{*},R)=0$$
  for all $i>0$.

Lemma 4.2.2 of Maximal Cohen-Macaulay Modules and Tate-Cohomology Over Gorenstein Rings, Buchweitz shows that over any Gorenstein ring, a finitely generated maximal Cohen-Macaulay module (using the definition given on mathoverflow) is Gorenstein projective, and clearly any Gorenstein projective module is maximal Cohen-Macaulay.
Therefore the definition given on mathoverflow (due to Buchweitz) is a good one and is equivalent to the usual definition over commutative local Gorenstein rings.
The lemmas I quoted are from section 10.2 of Relative Homological Algebra by Enochs and Jenda. It is a good introduction to Gorenstein modules and their homological algebra.
