First, in my childhood, I learned that gravity is a force. Later, I learned that gravity is a property of spacetime. If gravity is a property of spacetime, then why is it one of the fundamental forces. What is gravity, really?
Physics is complicated and has produced a large number of concepts in a short time. This has led to a lot of reuse of words where the same word is given substantially different meanings in different contexts. As a result, the real language of physics is math.
In the context of “the four fundamental forces” the word “force” just means an interaction term that can show up in a Hamiltonian or Lagrangian. This meaning makes no distinction between the “curvature of spacetime” model of gravity and the “force” model of gravity. The “four fundamental forces” label, by itself, should not be taken to favor one model of gravity over the other.
In the context of general relativity gravity is modeled as the curvature of spacetime. In this model the “real” gravity is tidal effects, which are represented by curvature, and not local gravitational acceleration, which is represented as a local fictitious force.
However, it is important to keep in mind that in the appropriate limit, general relativity reduces to Newtonian gravity. So general relativity contains Newtonian gravity as an inherent part of the general theory. In that limit there is no difference between gravity as a force and gravity as spacetime curvature.
Furthermore, Newtonian gravity is completely equivalent to Newton-Cartan gravity, which is a spacetime curvature theory of gravity. So there is, at a mathematical level (the real language of physics) and an experimental level, a complete equivalence between the curvature and force concepts. It is only convenience and superficial verbal descriptions that separate them.
Dale has already contributed a good answer, but I'd like to supplement it. It's important not to confuse the terrain for the map. At a fundamental level, "gravity" is the word we use to describe certain real phenomena (that apples move towards the center of the Earth, that the Earth revolves about the Sun, and so on). Gravity is real, and we experience it every day. The explanation for gravity is a different thing. Newton explained gravity by a law of universal attraction. That turns out not to be completely accurate... that is, Newton's theory of gravity produces incorrect predictions for some things (like the orbit of Mercury). Einstein came up with a better theory of gravity that models it as a curvature of spacetime. So far this is the best theory of gravity that we have, but someday it will probably be superseded by a better theory. The explanation may change, but the facts (orbits of planets, etc.) won't, and any new theory will have to produce the same predictions as general relativity in the situations where GR has been tested.
Gravity is a mathematical construct used to describe objects falling down. Newton wanted to be able to make a mathematical description of the motion of free falling objects, and this particular description used forces. It is possible to make other descriptions of this phenomenon by using other mathematical formulations or completely different theories. But all these formulations/theories are called "gravity" since they want to describe the motion of falling objects between masses. Contrary to other answers, I would say that gravity doesn't really explain "why" things fall, but just describes the falling of things mathematically.
if gravity is property of spacetime then why it is one of the fundamental forces.
If you replace the term "fundamental forces" with "fundamental interactions", everything becomes much more understandable.
As you correctly pointed out, "gravity is a property of spacetime". And it is not a force in the sense of mechanics. F=ma means that you feel an acceleration when something pushes or brakes you. In free fall, when a spaceship flies around the earth or crashes into it or follows any other geodesic line, there is no noticeable acceleration (by you or any other passenger). That is why Einstein replaced the term gravitational force with the geodesic line.