In cases of biliary pancreatitis caused by an obstruction due to gallstones in the bile duct, Endoscopic Retrograde Cholangiopancreatography (ERCP) plays a key role in treatment by enabling the removal of these stones.