Nobody really knows, but it is lucky for us that it is. The reason that the weak force is weak (but still very much stronger than gravity) is that the particle that carries the interaction has a mass. It is suspected that gravity is carried by a particle called the graviton (which has not yet been observed), but the graviton would have to be massless, so it cannot be weak for the same reason as the weak force.
One suggested reason, and there is no evidence that this is the case, is that there are more than 4 dimensions, but only gravity can get into the additional dimensions. This would mean that the force of gravity were spread over a larger volume than the other forces, so it would appear weaker.
As I said, there is no evidence for this and no one knows why gravity is so much weaker. Unifying gravity with the other forces is a fundamental problem of physics that I do not expect will be solved within my lifetime.
Let me explain in what sense gravity is weaker than the other three forces (electromagnetic force, weak nuclear force, strong nuclear force), because it may not be obvious to everyone. If I fall from a high place, the gravitational force between myself and the Earth feels quite strong.
The point is that the gravitational force between elementary particles, say electron and proton in an atom, is much weaker than the electromagnetic force. The strength of the gravitational force is proportional to the masses of the two objects, and it would be just as strong as the other forces if the masses of the electron and proton would be near 20 micrograms (which is known as the Planck mass). Therefore, the question is why they are so much lighter than that. This is not understood, and it is known as the “hierarchy problem”.