Battering Rams are excellent siege weapons in being able to take down your opponent's Gatehouses, providing a clear path into an enemy castle for friendly troops. Apart from using ranged attacks, for example using Trebuchets or Catapults, these are the only other way of successfully being able to destroy enemy Gatehouses in Stronghold 2.
Battering Rams are fairly durable, so unless your ranged units specifically attack them, there is little chance they will take these siege weapons out by chance. This allows them to slip through and deal out a lot of damage to your Gatehouses. Note however that man traps and other similar siege defences can still impact on your Battering Rams.
Battering Rams do not take a long time to quickly demolish Gatehouses once they start and it's very important to try your best to prevent them getting near in the first place. They are also fairly durable against other ranged attacks, for example Catapults or Trebuchets, as well as melee units, so you will need to focus resources on Battering Rams to take them out successfully.
You can recruit a Battering Ram from the rank of Royal Champion. You will need 150 gold for a Battering Ram, along with 4 peasants from the campfire before it can be recruited.