Behind the Euler-Lagrange Equations of a given Lagrangian is Hamilton's principle of least action (in the Lagrange version). Thus you calculate functional derivatives of the action with respect to [itex]q(t)[/itex]. The Euler-Lagrange Equations follow from the principle by setting the first functional derivative to 0.
To evaluate this derivative, you have to expand the arbitrary path around the trajectory, i.e., you calculate the functional derivative from its definition. If you have the action in standard form,
[tex]A[q]=\int_{t_0}^{t_1} \mathrm{d} t L[q(t),\dot{q}(t)],[/tex]
then the functional derivative is defined by
[tex]\frac{\delta A}{\delta q(t)}=\lim_{\epsilon \rightarrow 0} \frac{A[q+\epsilon \eta]-A[q]}{\epsilon}=\left. \frac{\mathrm{d} A[q+\epsilon \eta]}{\mathrm{d} \epsilon} \right|_{\epsilon \rightarrow 0}.[/tex].
Here [itex]\eta[/itex] is a function with support at a very small region around [itex]t[/itex]. Particularly you must have [itex]\eta(t_0)=\eta(t_1)=0[/itex] according to the constraints that the boundary points of the paths are not varied in Hamilton's principle (by definition).
After taking the derivative you take as another limit the support of [itex]\eta[/itex] to the single point [itex]t[/itex], i.e., in a sense [itex]\eta(t') \propto \delta(t'-t)[/itex]. From these considerations, after one integration by parts you get
[tex]\frac{\delta A}{\delta q(t)}=\frac{\partial L}{\partial x} - \frac{\mathrm{d}}{\mathrm{d} t} \frac{\partial L}{\partial \dot{q}},[/tex]
where the [itex]q[/itex] and [itex]\dot{q}[/itex] have to be taken as independent variables when taking the partial derivatives, but then have to be interpreted as [itex]\dot{q}=\mathrm{d} q/\mathrm{d} t[/itex] again when taking the time derivative.