Apparently it can. Energy is a property of a field, and for gravitational fields, you don't need matter to produce these kinds of fields.
Gravitational fields can act as their own source.
This means that if all known forms of matter vanished in the universe, there would still be some energy left over due to the presence of photons and other non-matter sources, along with the energy in the gravitational field itself, to serve as sources for the remaining gravitational field. We think that at the big bang, only some primordial field like the gravitational field existed, and in essence, its energy pre-existed that of matter as we know it.