Let's say you're driving along the highway and come up on another car. Try to get behind him and gently nudge his bumper. (Don't try this in real life.) Not too hard, right? That's docking with the ISS.
Now, do the same thing, except he's stopped on a steep downhill slope, and you're going 70MPH. You can use your brakes, but you have to push them pretty hard if you push them at all. If you come to a stop too early, the hill will accelerate you into his bumper. If you start on the brakes too late, you'll hit too hard. You have to time it precisely.
That's more or less landing on the barge, except you also have to steer in two dimensions, and you're coming it at more like 700MPH.
The 9 Merlin engines are designed to life the fueled and loaded rocket into space, and it's hard to design these engines for a wide range of thrusts - meaning big penalties in weight, performance, efficiency, etc. Thus, when you're dealing with just the first stage, nearly empty of fuel, even minimum thrust from one engine will accelerate it up pretty hard. It can't hover because of this, so they have to take the rocket falling down with considerable velocity and fire the engine at exactly the right time so that when it passes through zero vertical velocity, it's on top of the barge with no lateral velocity either, and then shut it off at exactly that moment.
Then fuel is a whole 'nother factor. There isn't much of it at landing time, and it probably still makes up a lot of the weight of the stage. So you also have to handle the weight constantly decreasing and any motion of the fuel, and not run out before your landing burn.
You need a huge amount of precise control, and your only tools for the job are a vastly over-powered rocket engine, a stage body not exactly designed for stable aerodynamic flight, and some teeny little hydraulic fins. It's gotta be a minor miracle that they can hit the barge at all, and not with some massive destroy-everything velocity.
My guess is that it primarily an issue of time. When you are trying to dock with the ISS, you are effectivly in a 0g environment, so you can take as much time as you want. This means that you can cancel out your relative velocity at a safe distance and crawl your way towards the ISS at whatever speed you like.
When you try to land on a barge, you essentially need to do a suicide burn, where you wait until the last second to fire your engines enough so that you have zero relative velocity at the instant you hit the barge [0].
Added to this is the fact that landing is largly an afterthought.They would not build, let alone launch, the rocket before they were confident it could dock. However, because the marginal cost of a landing attempt is (relativly) low, they decided that it is cheaper to attempt landings with low confidence and get data instead of attempt to engineer a perfect landing with high confidence before they attempt anything.
[0] If I recal correctly, their margin of error is stopping within one second of hitting the barge.
one second means 10m/s impact; that sounds like quite a lot for a freaking rocket. can you by any chance remember were did you get that from?
Landing on a moving target shouldn't be that hard except you get (almost) zero weight budget, you're relying on atmospheric braking which means intense heat, and at the end you're hoping the engine doesn't malfunction.
In case it wasn't clear there, the real challenge here is using something that wasn't designed for landing - it was designed for liftoff - to do the landing.
Musk is probably just happy it hit the barge, and tried to slow down some. We'll find out later if it:
a) ran out of fuel
b) misjudged the position and velocity of the barge at the moment of impact
c) landed at the intended speed because there were technical concerns that kept it from landing any slower
d) something else entirely
But keep in mind, the stage landed on the barge. That means it can be salvaged! Pretty cool, if you ask me.
KSP doesn't really have an equivalent, but you can compare it to trying to land on the moon using a solid rocket fuel engine. (The difference with SpaceX is that at least they can turn it off.)
Gilly is the smallest body in the program, so its gravity is so weak you can leave orbit with your space suit's thrusters.
Minmus suicide burn with a Mainsail could probably compare.
Landing a rocket on a barge involves dealing with gravity, wind resistance, air currents and the crazily unstable centre-of-gravity of a large vertical tube balancing on some rockets.
In mutual freefall, on orbit, it's possible to take as much time as you want, reducing relative velocities as much as you want, and keep things gentle.
When landing on the Earth (or a barge) you can only control speed so much before you run out of fuel, so you're stuck with high speeds, high accelerations, and large forces. The margins are much thinner and you have an extremely limited amount of time to get things done.
Additionally, the landings are an R&D program being carried out for very little cost, the ISS cargo trips are a commercial service being bought at around $130 million per flight, so the engineering resources available to either are considerably different. If SpaceX could plow hundreds of millions of dollars just into developing the operational capability of landing their rockets they'd likely have done it many times by now.