The latter. A bit loosely speaking: mass-energy warps space-time, and matter is just mass-energy in a particular form: one which is "bound up" in some way and has a velocity slower than light. "Dark matter" is considered a type of matter because it has mass and cannot be moving at or even near speed of light (or else it will not explain observations).
Example of something which is not matter and bends space-time? Light. A photon of light is itself massless, and of course moves at the speed of light. Oddly however, if you build a system containing many photons moving in different directions with respect to each other, like a mirrored box with many photons bouncing around inside it, then the system will have mass. A massless box filled with massless photons bouncing around is not massless! It will curve the space-time. In principle one could even bring so many photons into a small enough region of space that they generate a black hole. Think about that: a black hole made of massless light!
A bit more precisely, in the technical jargon of general relativity, we say that "4-momentum" is the source of space-time curvature. What the actual tensor equations of general relativity describe is a relation between the amount of 4-momentum passing through a space-time region (the "stress-energy tensor") to the amount of curvature generated (the "metric tensor"). A little while ago I discussed on the SE Discord channel why a system of photons moving in different directions relative to each other has mass, despite the photons themselves being massless, using principles of 4-momentum. I think this is a really interesting and counter-intuitive thing and I'll reproduce it here:
4-momentum is the generalization of momentum to the four dimensions of space and time together. Something which does not move through the space does move through time, and you can imagine a "velocity" with which it does. (It will be rate of change of time coordinate, dt, with respect to the proper time dτ: the time interval measured by the object itself.) Every component of the 4-velocity is the rate at which the coordinates (t, x, y, z) change with respect to the time measured in the frame of the particle itself.
It turns out that this "time component" of the 4-velocity is in fact the energy of the particle (divided by speed of light), and the "spatial components" of the 4-velocity are the regular 3-dimensional momenta. So we can write 4-velocity as a vector with components [E/c, p[sub]x[/sub], p[sub]y[/sub], p[sub]z[/sub]].
Relativistically, the energy of any object is
E[sup]2[/sup] = m[sup]2[/sup]c[sup]4[/sup] + p[sup]2[/sup]c[sup]2[/sup]
Where m is its mass (which is invariant), c is speed of light, and p is the regular 3-momentum. Notice that if the speed of the particle is zero, then the momentum p is zero, and this reduces to the famous equation E=mc[sup]2[/sup]. Whereas for a massless particle like a photon, m=0, and then E=pc. (This is why photons have momentum despite having no mass.)
Let's rewrite this equation and choose units where the speed of light c=1 (like 1 light year per year). Then we can solve for the mass as:
m[sup]2[/sup] = E[sup]2[/sup] - p[sup]2[/sup]
Now we can combine this with the principle of 4-momentum. The mass of a particle can be found by its 4-momentum, and the mass of a system can be found by combining the components of the 4-momenta of each of its constituent particles. Let's go through a couple of examples using photons.
A single photon has energy E and momentum p=E/c. Again let c=1, so both its energy and its momentum are simply E. Now consider a photon moving purely in the +x direction. Its 4-momentum will be [E, p[sub]x[/sub], p[sub]y[/sub], p[sub]z[/sub]] = [E, E, 0, 0]. Now compute the mass. m[sup]2[/sup] = E[sup]2[/sup] - p[sub]x[/sub][sup]2[/sup] = E[sup]2[/sup] - E[sup]2[/sup] = 0. The photon is massless.
Now consider two photons moving in tandem in the +x direction. The 4-momentum of the system will be [E+E, E+E, 0, 0] = [2E, 2E, 0, 0], and the (squared) mass will be (2E)[sup]2[/sup] - (2E)[sup]2[/sup] = 0. This system is massless, since the photons are moving together.
Finally, let the photons move in opposite directions. Then the 4-momentum of the system is [E+E, E-E, 0, 0] = [2E, 0, 0, 0]. Will this system still be massless? Check: m[sup]2[/sup] = (2E)[sup]2[/sup] - (0)[sup]2[/sup] = 4E[sup]2[/sup]. Or, m = 2E. Not massless! As if by magic, we obtained mass from things that have no mass. The photons themselves are massless, but the system is not, because the photons are moving with respect to each other. Their respective 4-momenta generates gravitation.
If this seems totally weird, it is. But it has very important consequences in particle physics. You can collide two (sufficiently energetic) photons together and produce new particles of matter! Matter from not-matter.
Another important consequence shows up in cosmology. The very early universe was much hotter and denser than today, and the energy contained in the form of photons was enormous compared to the energy in the form of non-relativistic matter. The gravitating effect of all those photons moving through the space was not negligible, and we must account for it when studying the universe's early evolution.