Does a field gain energy or does the mass/charge? My textbook reads that when a mass/ charge is moved into the influence of a gravitational/ electric field the field gains/ loses energy rather than the mass/ charge. How can this be explained? 
 A: 
My textbook reads that when a mass/ charge is moved into the influence
  of a gravitational/ electric field the field gains/ loses energy
  rather than the mass/ charge. How can this be explained?

$\let\eps=\varepsilon \let\sig=\sigma \def\half{{\textstyle{1 \over 2}}}
\def\cE{\mathcal E}$
In a sense they are both true. They are alternative descriptions of
the same phenomenon. Sometimes one is more useful, sometimes the
other.
Consider e.g. the gravitational case, in the framework of Newtonian
physics. Although it would be possible to think of energy of the
gravitational field, when it comes to computing planets' motions
nobody does it. Instead it helps very much to attribute a gravitational
energy to Sun and planets themselves, as a function of their
reciprocal distances.
In e.m. case both viewpoints may be of use, according to the problem.
Consider e.g. a plane capacitor. Then it's easier to think of energy
as due to the electric field between plates. Maybe you know the
formula:
$$\cE = \half \eps_0 E^2 V \tag1$$
where $V = S\,d$ is volume of space between plates (I assumed a
uniform field).
We may play with eq. (1), using the espression for electric field
$$E = {\sig \over \eps_0}.$$
We find
$$\cE = \half\,\eps_0\,S\,d\,{\sig^2 \over \eps_0^2} = 
  {Q^2 d \over 2\,\eps_0\,S} = {Q^2 \over 2\,C}.\tag2$$
I've used $Q = \sig\,S$ and capacity formula:
$$C = {\eps_0\,S \over d}.\tag3$$
Remember that eq. (2) is usually arrived at by another way, so this is
a useful check. But one could turn the argument around, deriving
ffirst (3), then energy (2), and arriving at eq. (1) for energy as a
function of field.
Viewing energy as a property of fields is also important in more
complex cases but I don't write on that because I'm not sure you heard
of the relevant physics (e.g. e.m. waves).
