123hoedjevan gives you a wrong answer. The principle of least action states that the physical configuration of the system of fields realizes a minimum of the action with respect to compactly supported variations of the fields which, by the very definition of compactly supportedness, must then vanish on the boundary of the support itself. This in turn means that, in the formula
$$
\delta S=\int_{\Omega}d^{d}x\ \bigg[\bigg(\frac{\partial\mathcal{L}}{\partial x^{\mu}}-\partial_{\mu}\frac{\partial \mathcal{L}}{\partial\, \partial_{\mu}\phi}\bigg)\,\delta\phi\bigg]+\int_{\Omega}d^{d}x\ \partial_{\mu}\bigg(\frac{\partial \mathcal{L}}{\partial\, \partial_{\mu}\phi}\,\delta\phi\bigg)
$$
($d=\dim \Omega$), $\Omega$ must be compact. Now, as for the last term, we get
$$
\int_{\Omega}d^{d}x\ \partial_{\mu}\bigg(\frac{\partial \mathcal{L}}{\partial\, \partial_{\mu}\phi}\,\delta\phi\bigg)=\int_{\partial\Omega}d^{d-1}x_{\mu}\ \bigg(\frac{\partial \mathcal{L}}{\partial\, \partial_{\mu}\phi}\,\delta\phi\bigg)
$$
where I denoted by $d^{d-1}x_{\mu}$ the (oriented) volume element of the boundary $\partial\Omega$. The identity follows from Stoke's theorem, which (in one of its many forms) states that if you have a function $f$ defined on a compact set $\Omega$, then
$$
\int_{\Omega} d^{d}x\ \big(\partial_{\mu}\,f\big)=\int_{\partial\Omega} d^{d-1}x\ \big(f\ n_{\mu}\big)
$$
where $\partial\Omega$ is the boundary of $\Omega$ and $n_{\mu}$ are the components of the vector field normal to $\partial \Omega$ (notice that $n_{\mu}\,d^{d-1}x$ and my definition of $d^{d-1}x_{\mu}$ are the same thing). The proof of the theorem can be easily found on standard textbooks or on the internet. Going back to our integral, as $\delta\phi$ is by definition (i.e. as part of the hypotheses of the theorem) zero on the boundary of $\Omega$,
$$
\int_{\Omega}d^{d}x\ \partial_{\mu}\bigg(\frac{\partial \mathcal{L}}{\partial\, \partial_{\mu}\phi}\,\delta\phi\bigg)=\int_{\partial\Omega}d^{d-1}x_{\mu}\ \bigg(\frac{\partial \mathcal{L}}{\partial\, \partial_{\mu}\phi}\,\delta\phi\bigg)=\int_{\partial\Omega}d^{d-1}x_{\mu}\ 0=0
$$
hence, as $\delta S=0$,
$$
\delta S=\int_{\Omega}d^{d}x\ \bigg[\bigg(\frac{\partial\mathcal{L}}{\partial x^{\mu}}-\partial_{\mu}\frac{\partial \mathcal{L}}{\partial\, \partial_{\mu}\phi}\bigg)\,\delta\phi\bigg]=0
$$
and since this must hold for any compact $\Omega$ and any compactly supported $\delta\phi$,
$$
\frac{\partial\mathcal{L}}{\partial x^{\mu}}-\partial_{\mu}\frac{\partial \mathcal{L}}{\partial\, \partial_{\mu}\phi}=0
$$
The compactness of $\Omega$ (and in turn the compactly supportedness of the variation of the fields) can indeed be removed from the hypotheses of the theorem, as long as the action integral is well-defined on $\Omega$. On the other hand, the fact that the variation must vanish on the boundary of the domain of integration cannot be removed from the hypotheses. Hence the former is still valid for non-compact $\Omega$'s.
When proving Noether's theorem (which is different from proving the equivalence between minimization and the Euler-Lagrange equations, and ultimately depends on this very proof), one allows for variations that do not vanish on the boundary of the domain of integration; moreover, in its usual formulation, Noether's theorem allows for the coordinates of the domain of integration to be varied. It is in this context that the Noether current arises as a divergenceless field, and the Noether current is defined as
$$
j^{\mu}=-T^{\mu}_{\nu}\ \delta x^{\nu}+\frac{\partial\mathcal{L}}{\partial\,\partial_{\mu}\phi}\ \delta\phi
$$
where
$$
T^{\mu}_{\nu}=\frac{\partial\mathcal{L}}{\partial\,\partial_{\mu}\phi}\ \partial_{\nu}\phi-\mathcal{L}\ \delta^{\mu}_{\nu}
$$
is the canonical energy-momentum tensor.
I) Actually, it's the other way around. Within the context of Newtonian mechanics, the hierarchy is the following from most to least applicable:
Newton's laws are always applicable.
D'Alembert's principle or Lagrange equations. E.g. sliding friction typically violates D'Alembert's principle.
The stationary action principle $S=\int\! dt~L$, with Lagrangian $L=T-U$, and its Euler-Lagrange equations. E.g. a generalized force might not have a generalized potential $U$.
II) In point 3 we have tacitly assumed that the Lagrangian is of the form $$L~=~T-U,\tag{1}$$
as is customary. $T$ and $U$ in eq. (1) may be viewed as representing the kinematic and the dynamical side of Newton's 2nd law, cf. e.g. this Phys.SE post. The linear structure of eq. (1) also reflects a categorical-like composition rules for how to build physical models out of physical subsystems.
There exist strictly speaking exceptions to the form (1), cf. e.g. this Phys.SE post, but these exceptions often lacks categorical-like composition rules, which make them unsuitable for useful model building.
III) For further details and discussions, see e.g. my related Phys.SE answers here, here, and links therein.
Best Answer
Suppose now the Lagrangian $L$ is a function of $y(x), y'(x)$ and also $y''(x)$, i.e. it contains second derivatives w/r to the parameter $x$.
It is straightforward to adapt the usual procedure to this case: write \begin{align} Y(x,\epsilon)=y(x)+\epsilon\,\eta(x) \end{align} for an otherwise arbitrary function $\eta$.
We then have the parametrized integral \begin{align} I(\epsilon)=\displaystyle \int_a^b\,dx\,L(x,Y(x,\epsilon),Y'(x,\epsilon), Y''(x,\epsilon)) \end{align} and we want to find $L$ at $\epsilon=0$ so that \begin{align} 0&=\frac{dI}{d\epsilon}\vert_{\epsilon=0}\, ,\\ &=\displaystyle\int_a^b\,dx\, \left( \frac{\partial L}{\partial Y} \frac{\partial Y}{\partial \epsilon}+ \frac{\partial L}{\partial Y'}\frac{\partial Y'}{\partial \epsilon} +\frac{\partial L}{\partial Y''}\frac{\partial Y''}{\partial \epsilon} \right)\vert_{\epsilon=0}\, ,\\ &=\displaystyle\int_a^b\,dx\, \left( \frac{\partial L}{\partial y}\eta +\frac{\partial L}{\partial y'}\eta' +\frac{\partial L}{\partial y''} \eta'' \right)\, . \end{align} We need to turn around the terms in $\eta'$ and $\eta''$. A first integration by parts will do this: \begin{align} \displaystyle\int_a^b\,dx\, \frac{\partial F}{\partial y'}\frac{d\eta}{dx} &=\frac{\partial F}{\partial y'}\eta(x)\Bigl\vert_a^b- \displaystyle\int_a^b\,dx\,\eta \frac{d}{dx}\left(\frac{\partial F}{\partial y'}\right)\, ,\\ \displaystyle\int_a^b\,dx\, \frac{\partial F}{\partial y''} \frac{d\eta'}{dx}&= \frac{\partial F}{\partial y''}\eta'(x) \Bigl\vert_a^b- \displaystyle\int_a^b\,dx\,\eta' \frac{d}{dx}\left(\frac{\partial F}{\partial y''}\right)\, . \end{align} We assume now that the function $\eta$ is chosen so that $\eta(b)=\eta(a)=0$ as before. In addition, we must also assume that $\eta'(b)=\eta'(a)=0$, a new condition.
In this way we have \begin{align} \displaystyle\int_a^b\,dx\, \frac{\partial L}{\partial y'}\eta'&= -\displaystyle\int_a^b\,dx\,\eta\, \frac{d}{dx} \left(\frac{\partial L}{\partial y'}\right)\, ,\\ \displaystyle\int_a^b\,dx\, \frac{\partial L}{\partial y''}\eta''&= -\displaystyle\int_a^b\,dx\,\eta'\, \frac{d}{dx}\left( \frac{\partial L}{\partial y''}\right)\, . \end{align}
We still need to turn $\eta'$ around one last time. Using integration by parts again: \begin{align} -\displaystyle\int_a^b\,dx\,\eta' \frac{d}{dx}\left(\frac{\partial F}{\partial y''}\right)= + \displaystyle\int_a^b\,dx\, \eta\,\frac{d^2}{dx^2}\left(\frac{\partial F}{\partial y''}\right) \end{align} where the boundary condition $\eta(b)=\eta(a)$ has been used to eliminate the boundary term.
Thus, putting all this together, we get \begin{align} 0=\frac{dI}{d\epsilon}\Bigl\vert_{\epsilon=0} =\displaystyle\int_a^b \,dx\,\eta\, \left(\frac{d^2}{dx^2}\left(\frac{\partial F}{\partial y''}\right)-\frac{d}{dx} \left(\frac{\partial F}{\partial y'}\right) +\frac{\partial F}{\partial y}\right)\, . \end{align} Since $\eta$ is arbitrary (up to the boundary conditions), we find therefore the function $L$ must satisfy the differential equation \begin{align} 0=\frac{d^2}{dx^2}\left( \frac{\partial L}{\partial y''}\right)- \frac{d}{dx}\left(\frac{\partial L}{\partial y'}\right)+\frac{\partial L}{\partial y}\, . \end{align} The generalization to $L$ containing yet more derivatives is obvious: for a the derivative of order $k$ we obtain a sign $(-1)^k$ as we need $k$ integrations by parts. Thus, we obtain the generalized Euler-Lagrange equation in the form \begin{align} 0&=\sum_{k}(-1)^k\frac{d^k}{dx^k} \left(\frac{\partial L}{\partial y^k}\right) \equiv E(L)\, ,\\ E&=\sum_k (-1)^k \frac{d^k}{dx^k} \frac{\partial }{\partial y^k}\, . \end{align}
There's some discussion of this (including how to properly define a conjugate momentum) in the following:
and also in