Just to get that out of the way, "straight line" here means geodesic on a curved surface/manifold, but I guess you understand that.
"If the Earth travelling around the Sun is just moving along a straight line in the curved space, shouldn't light also be trapped in orbit around the Sun?"
As you've guessed, they don't follow the same geodesic because of their velocity. And the velocity of a body is automatically taken into account, because you don't just compute these geodesics in curved space, but in curved spacetime, where this makes a difference: Imagine a $t$-$x$-diagram and how the earth or a ray of light go away from the origin. The earths path will be close to the time axis, while the light path will be leaning towards the space axis (depending on your units). Both paths are similarly affected by the curvature of spacetime but they clearly start out in different directions (in spacetime, not in space) and so the geodesics will be quite different. There is some specific angle for which the object will be orbiting (notice that this now requires at least two spatial dimensions). Smaller angles will fall towards the earth while bigger angles will boldly go where no man has gone before. This is a very geometric notion of escape velocity.
"I expect the actual equations in the theory also take into account a body's velocity, not just the curvature."
Since you have 1000 rep on SE Mathematics I can formulate it this way: The geodesic equations are, like Newtons second law, second order and so they require two initial values. One is a position vector and the other one is a velocity vector, i.e. the direction in spacetime. The curvature (and that's another business) is taken into account by the coefficients of $\Gamma$ in the differential equations. These coefficients are basically derivatives of the spacetime metric, which itself must be a solution of the Einstein equations.
Also, if you take a look at the geodesic equation, you see that for $\Gamma = 0$ (flat spacetime), you get the easy case $x''(t)=0$, or $x(t)=x_0+v_0t$, which represent actual straight lines. Here $x_0$ and $v_0$ are initial data.
Furthermore, due to the equivalence principle in general relativity, the geodesics don't depend on the mass of the objects. All things fall equally, once they have the same starting position and velocity. But if two different masses are initially at rest (or since this is a relative statement let's better say: not moving relative to each other), then because of the relation between acceleration and mass, it is more difficult to get the heavier mass to have a certain starting velocity, i.e. direction in spacetime. And therefore you personally will never be able to get a chair on the same trajectory as a pen, which you forcefully throw in a certain direction in space. The chair is too heavy for you to make it follow the same path you could make a small pen follow. If two objects with different masses are initially at rest (not moving relative to each other) and then get pushed equally hard by some force, they will not both end up orbiting the same thing.
So even if the geodesics of spacetime don't depend on the masses of the objects, which would follow them, you'll never see a ray of light follow the same trajectory as a flashlight, because, by the laws of relativity, the flashlight can't move at the speed of light. This is the extreme example: Massive objects never follow light-like geodesics and the other way around.