Why does the photon propagator contain the metric tensor? The Klein Gordon propagator is (Peskin p-30)
$$
D_F(x-y)=\frac{i}{p^2-m^2}
$$
which is actually the Green's function of the KG field. But a photon contains additionally $g_{\mu\nu}$ in the numerator. I would expect its propagator to be the same as $D_F$ since the photon is gauge boson. Why does it have $g_{\mu\nu}$? Does this somehow follow from the Ward identity? 
 A: Photon has spin 1 :) I am serious. Check it if you don't believe me.
The physical meaning of the photon propagator $\Delta_{\mu \nu}$ is the following:
$$ \Delta_{\mu \nu} (x-y) = \left< A_{\mu}(x) A_{\nu}(y) \right>, $$
where $A_{\mu}$ is the electromagnetic potential form and $\left< ... \right>$ is a shorthand for the vacuum expectation value of the time-ordered operator product (in the non-interacting theory, ofcourse), or, equivalently (in the path integral picture), the following holds for any functional $\Omega[A]$:
$$ \left< \Omega[A] \right> = \int DA \cdot e^{i S[A]} \cdot \Omega[A], $$
where path integral measure $DA$ is defined up to normalizations and the $\left< 1 \right> = 1$ normalization condition is chosen.
This picture is obscured by gauge invariance, because non-gauge-invariant expectations are ill-defined. Probably the best way to deal with this is to eliminate gauge invariance by introducing the gauge-fixing term.
P.S. imagine that you have two spin-0 fields labeled by an index $\phi^a$. The propagator is then a $2\times 2$ matrix $\Delta^{a b}$. This is natural, because $\Delta$ encodes transition rates between two separate degrees of freedom ($a$ and $b$).
P.S.2. You mentioned the Klein-Gordon propagator to be the Green's function of the $\left( \Box + m^2 \right)$ operator. Well, the same holds for the photon propagator.
In the Feynman gauge, field equations are the following:
$$ \Box A_{\mu} = 0 \quad (\forall \mu), $$
which means that the field $A_{\mu}(x)$ is annihilated by the differential operator $\delta_{\nu}^{\mu} \Box$.
The Green function is therefore labeled by two space-time positions ($x$ and $y$) and two indices ($\mu$ and $\nu$) and is exactly
$$\Delta_{\mu}^{\nu}(x - y) = \delta_{\mu}^{\nu} \cdot D_F (x - y); $$
$$\Delta_{\mu \nu}(x - y) = g_{\mu \nu} \cdot D_F (x - y). $$
A: 
[...] since photon is spin-zero gauge boson. Why does it have gμν ? Does
  this somehow about Ward identity?

Photon is not "spin-zero gauge boson". It is "spin one gauge boson".
