In field theory your Lagrangian is given by the spaticial integral of the Lagrange density ##\mathcal{L}(\phi,\partial_{\mu} \phi)## and thus the action as an integral over spacetime
$$S[\phi]=\int \mathrm{d}^4 x \mathcal{L}(\phi,\partial_{\mu} \phi).$$
In the above example oviously the author considers a field theory in (1+1)-dimensional spacetime, but that doesn't change much. So for clarity I assume here the full case of a (1+3)-dimensional spacetime.
Now note that the gradient of the field, ##\partial_{\mu} \phi=\frac{\partial \phi}{\partial x^{\mu}}## has four components. Now you take the variation of the action wrt. the field,
$$\delta S[\phi]=S[\phi+\delta \phi]-S[\phi]=\int \mathrm{d}^4 x \left [\delta \phi \frac{\partial \mathcal{L}}{\partial \phi} + \partial_{\mu} \delta \phi \frac{\partial \mathcal{L}}{\partial (\partial_{\mu} \phi)} \right ].$$
Note that here the Einstein summation convention has been used, i.e., in the second term in the bracket you sum over ##\mu## from ##0## to ##3##. That's because the Lagrange density depends on all four components of the field gradient, ##\partial_{\mu} \phi##, and it's just the chain rule of multivariable calculus used here. It's pretty much the same as in point-particle mechanics, only that in this case the independent variables ##q(t)## are functions only of ##t##.
To get the Euler-Lagrange equations you just have to do an integration by parts in this 2nd term, using the assumption that ##\delta \phi## vanishes at the boundaries of the integration domain. Then you get
$$\delta S=\int \mathrm{d}^4 x \delta \phi \left [\frac{\partial \mathcal{L}}{\partial \phi} - \partial_{\mu} \frac{\partial \mathcal{L}}{\partial (\partial_{\mu} \phi)} \right ],$$
i.e.,
$$\frac{\delta S}{\delta \phi} = \frac{\partial \mathcal{L}}{\partial \phi} - \partial_{\mu} \frac{\partial \mathcal{L}}{\partial (\partial_{\mu} \phi)}.$$
If you write this out and restricting yourself to (1+1)D spacetime you get the result given in the book.