It can be noted that particles (cosmic rays) pass the Earth at close to the speed of light every day. From their point of view, the Earth IS moving at very close to the speed of light, yet clearly, the Earth does not turn into a black hole. That is the short answer, but how do we prove that is what the equations of relativity predict when the object appears to be moving close to the speed of light?
In Newtonian physics, inertial mass and gravitational mass are equal, and Newton considered this a mystery as he could find no reason why this should be the case. Things are slightly different in relativity. The gravitational formula is:
$$F = \frac{GMm}{R^2}$$
where $M$ is the active gravitational mass (the attracting mass), and $m$ is the passive inertial mass (which is the proportionality factor between how a particle accelerates relative to the force applied to it). The relativistic equation for force transverse to the motion is:
$$F'_{\perp} = \frac{G(M\gamma^{-2})(m\gamma)}{R^2}$$
where $\gamma$ is the usual relativistic gamma factor equal to $1/\sqrt{1-v^2/c^2}$ where $-v$ is the velocity of the observer orthogonal to the gravitational force vector. The end result is that the observer sees the transverse gravitational force to be weaker by a factor of gamma such that $F_{\perp}' = F/\gamma$. This is in agreement with the Lorentz transformation of transverse force and the old-fashioned concept of transverse inertial mass.
Consider the following scenario: A scientist measures the time for a mass to fall from a height L above the surface as $t_0$. He calculates the acceleration as $a_0 = L_0 t_0^{-2} = g \ \text{m/s}^2$. To an observer (Anne) moving East to West at a velocity such that the gamma factor is $\gamma = 2 $, the time to fall a vertical distance of $L$ is $2 \ t_0$ seconds due to time dilation. Using the equation of motion, $ L =1/2 \, a t^2 \iff a = 2L/t^2$, she calculates the acceleration to be $2L_0 t_0^{-2} \gamma ^{-2} = g/4 \ \text{m/s}^2 $. In other words, $a =a_0/\gamma$ and the force of gravity on the surface of the Earth appears to be weaker to the passing observer. Objects appear to fall in slow motion.
To Anne, the passive inertial mass of the falling test object has increased by a factor of gamma. We can now calculate the force acting on the test object with a rest mass of $m_0$ and acceleration $a_0$ in the rest frame as $F = m a = (m_0 \gamma )(a_0 \gamma^{-2}) = F_0 \gamma^{-1}$ in agreement with the result obtained earlier. For a large object like the Earth to become a black hole, it has to be compressed by a force. I have shown that the transverse compression force is actually weaker from the point of view of an observer who sees the system as moving with relativistic velocity. The Lorentz transformation also tells us the compression force parallel to the motion is the same as the force measured in the rest frame of the system, so, overall, there is no increased compression force. The proper volume of the Earth remains the same in its rest frame, so there is no increase in the mass density, so there is no reason to think the Earth should become a black hole as a result of being accelerated to relativistic velocities or equivalently, as a result of an observer passing by at close to the speed of light. It is not predicted by the equations of relativity.