Docking with Jump Gates is the easiest thing to do with a Barge, in my experience. You just put the thing so it's nearly touching the gate clamp things, and then hit dock. The important thing is to get the front of the Barge into the gate, just like with any of those other big ships. Most of the time the Barge likes to fly up a little high through the gate, but it has always connected and gone zoom.
Planets is simple too, all you do is put the Barge so that the very front of the hitbox is resting on the very top of the Mooring Fixture. This will prevent it from trying to turn down and completely fail to find a good dock point. Instead it will inch into the planet, sliding along the top of the fixture, and quick-dock within a few seconds.
Stations is not much fun. I haven't been able to dock with a station, but I also don't plan on doing it soon. I much prefer using transports or other ships to attend to Barge station needs, and it's pleasant seeing the Barge sitting not-really-moored-but-more-like-anchored next to the station while small ships, like Mastodons and Container Transports, dart about. It makes for nice photos and the extra time it takes doesn't feel like a waste.
Jump Holes I haven't been able to dock with yet, though the only one I have tried so far is the one to Alberta from Ontario. I have seen a Barge dock with a Jump Hole, in the middle of an asteroid belt even, so it is very possible. I imagine the technique is similar to other docking, except requiring more precision since you don't have anything solid (unless the Jump Hole decides to collide with you, which it does sometimes) to help you keep the Barge on course. It doesn't aim perfectly on its own, so you need to position the barge so that the position it should try to aim for hits the mark while it's trying to get some other position into place.
"It's not so much working with the Barge as tricking it into doing what it should."