3 Answers
3

According to the general equivalence principle: Anything creates gravitational field.
This is because Anything (except Nothing) carries a non-zero energy-momentum tensor, which is the source of gravitational field.

There's an interesting section in MTWs "Gravitation" describing how the GR equations can be arrived at by considering massless spin-2 field ("gravitons") in flat spacetime and iterating corrections from considering that the non-zero stress-energy tensor for this field is a source of this field, i.e., gravitons gravitate.

The source of the spacetime curvature is the stress-energy tensor. One component of this is energy density, where mass is counted as energy using Einstein's famous equation $E = mc^2$. Photons possess energy so they do contribute to the curvature.

However there are other things, as well as energy density, that contribute to the curvature and therefore gravity. These are:

momentum flux

pressure

shear stress

The W and Z gauge bosons are massive at low energies and contribute to gravity courtesy of this mass. Above the electroweak transition the bosons become massless but still possess the same energy so still contribute to gravity.

Gravitons are somewhat speculative since they're a concept arising from a canonical quantisation that isn't renormalisable. However if you consider the classical equivalent of the graviton to be simply the gravitational field (i.e. the curvature) then yes it does contribute to the curvature. This is known as the gravitational self energy.