Not necessarily.

F = MA is a very general statement of Newton's Second Law of Motion, which says a mass, M, accelerates, A, when a net force, F, is applied to it. And that's all it says.

No gravity. In fact the source of the force, F, is not specified in F = MA.

There is no reason at all why F cannot be W, the force of gravity, which is often called weight. When you step onto a bathroom scale and read off your weight, you are reading off the force due to gravity. So there is no reason why one cannot write F = W = MA; where A = W/M = g is the acceleration due to the force of gravity, the weight.

F might also come from F = qE + q(v X B) = MA where E and B are the electro magnetic fields and q is some charge that the mass M has. So instead of gravity, this force comes from the electro-magnetic fields acting on a charge.

And force might also come from F = MV^2/R = MA where V is the tangential speed of the mass M going around a circle of radius R. A = V^2/R here is the radial acceleration along the radius R.

Bottom, line, F = MA is just a general relationship. What the source of the force and the mass are depends on the specific problem.