The kinetic energy of a relativistic mass is given by $(\gamma -1)mc^2$, where $m$ is the mass of the object and $\gamma$ is the Lorentz factor $(1 - v^2/c^2)^{-1/2}$, where $v$ is the speed.
Asteroids (obviously it wouldn't be an asteroid from our Solar System) have a range of densities from about 1 to 6 g/cm$^3$. Let's leave that as a variable - $\rho$.
The mass of the asteroid is then just its volume multiplied by its density and then the kinetic energy is
$$K = (\gamma -1)\frac{\pi d^3}{6}\rho c^2 $$
The momentum of the asteroid is
$$ \gamma mv = \gamma \frac{\pi d^3}{6} \rho v$$
How much damage this will do will depend on the size of $\gamma$ and $\rho$ and the question isn't answerable without at least specifying what the former is.
The gravitational binding energy of the Earth is approximately $3GM_E^2/5R_E = 2\times 10^{32}$ J. In an inelastic collision, roughly all of the kinetic energy would be transferred. If we equate the binding energy with $K$, then we find that the value of $\gamma$ that gives enough energy to "unbind" (i.e. explode) the Earth is
$$ \gamma_{\rm explode} > 2\times 10^{32}\frac{6}{\pi d^3 \rho c^2} +1 = 12.3 \left(\frac{d}{5{\rm km}}\right)^{-3} \left(\frac{\rho}{3 {\rm g/cm}^3}\right)^{-1}$$
$\gamma =12$ corresponds to a speed of $0.9965c$. This is about 10,000 times faster than the asteroid hypothesised to have killed off the dinosaurs and caused mass extinction.
Note that the asteroid cannot simply "punch through the Earth" because the column of material it would have to displace to do so has a mass that is roughly 2500 times that of the asteroid and is encased in a mass which is many orders of magnitude bigger than that (ignoring glancing blows). It might emerge on the other side, but only after having lost most of its kinetic energy.
But this raises another possibility. Suppose that $\gamma$ was a bit less than this - rather than being destroyed, would the Earth be knocked out of orbit?
Conservation of momentum suggests the change in velocity of the Earth would be
$$ \Delta V_E = \frac{\gamma m v}{M_E + m} \simeq \gamma c\left(\frac{m}{M_E}\right) $$
If we say that a "significant orbital perturbation" is a $\Delta V_E > 1$ km/s (the Earth's orbital speed is about 30 km/s), then the $\gamma$ required to achieve this is
$$\gamma_{\rm perturb} > 10^5 \left( \frac{\Delta V_E}{1 {\rm km/s}}\right) \left( \frac{d}{5{\rm km}}\right)^{-3}\left( \frac{\rho}{3 {\rm g/cm}^3}\right)^{-1} $$
Thus it seems that the Earth will not get "knocked out of orbit" before it gets totally destroyed by the deposition of kinetic energy. Note, that since $\gamma_{\rm explode}/\gamma_{\rm perturb}$ is independent of asteroid size and density, this conclusion is independent of those factors.