The Puzzle of Uranus

We were wondering today how Uranus came to be on its side?  If Uranus is a gas giant (which it is), how could an asteroid have bumped into it?  Would the asteroid not just have travelled through the gases and out the other side?  Great question!