When you use \csname gather*\endcsname
, amsmath
is smart enough to know what environment's name it has been called in, so as to absorb all text until the corresponding \end
command appears. With your code it determines to have been called in minipage
, but it's not able to see \end{minipage}
, that's buried inside the end code.
So, just like Dan proposes, you can use \minipage
and \endminipage
. But this will not give a good output (I added \fbox
around it just to clearly show the problem):

Why's that? Because you're starting a paragraph with a display, which shouldn't be done.
A workaround is to back up by \baselineskip
\documentclass[border=6pt]{standalone}
\usepackage{amsmath}
\newenvironment{mygather}
{%%
\minipage{2in}
\vspace{-\baselineskip}
\csname gather*\endcsname
}{%%
\csname endgather*\endcsname
\endminipage
}
\begin{document}
\fbox{\begin{mygather}
y = x^{2} - 3x + 5
\end{mygather}}
\end{document}

A simpler way is
\documentclass[border=6pt]{standalone}
\usepackage{amsmath}
\newenvironment{mygather}
{%%
\minipage{2in}
\centering$\!\gathered
}{%%
\endgathered$
\endminipage
}
\begin{document}
\fbox{\begin{mygather}
y = x^{2} - 3x + 5
\end{mygather}}
\end{document}
align
within a custom environment with amsmath, but I can't find it right now. I think that the solution was to use theenviron
package. – Andrew Stacey May 28 '14 at 16:57equation
andsplit
. – Werner May 28 '14 at 17:43gathered
environment defined in themathtools
package. that's meant as a subsidiary environment, whichgather
is not. – barbara beeton May 28 '14 at 18:20mathtools
. Ultimately I've chosen to go with theenviron
package. – A.Ellett May 28 '14 at 19:10