Your g[1] and g[2] are simply acting as Head:
g[1] := Plus;
So there is no mystery in this syntax:
{g[1][a, b], Plus[a, b]}
{a + b, a + b}
Head /@ {g[1][a, b], Plus[a, b]}
{Plus, Plus}
So you need to read:
But maybe there is a bit more to it than meets the eye. You actually almost wondered into programming concept called Currying which according to Wikipedia "is the technique of transforming a function that takes multiple arguments in such a way that it can be called as a chain of functions each with a single argument (partial application)."
So you can do things like:
f[x_][y_] := Sin[x y]
f[x] /@ Range[5]
{Sin[x], Sin[2 x], Sin[3 x], Sin[4 x], Sin[5 x]}
Documentation mentions it here. For deeper insight see discussion in @SalMangano "Mathematica Cookbook".
BTW, @acl nice addition (to see how Mathematica thinks) can be visualized as
TreeForm[Trace[g[1][a, b]]]

So the thinking goes from top to bottom and from left to right.
Read the FAQs! 3) When you see good Q&A, vote them up byclicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem,by clicking the checkmark sign` – Vitaliy Kaurov Aug 25 '12 at 08:35