Skipton Road at Cross Hills was closed on Monday evening after a fault developed on the level crossing barriers.
Police took action after passers-by reported that the barriers kept going up and down without any reason.
The alarm was raised at 5.30pm and the barriers were closed for about two hours while repairs were carried out by Network Rail.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article