IIRC, Will placed a cross in the top of the coffin, so that when the coffin was closed the cross would face down towards Barnabas. Personally, I don't think it would've affected Barnabas at all. He could've just closed the lid or turned away like he did when someone would hold a cross up to him.
Will held a cross plus there was another cross affixed to the inside lid of the coffin. I think we're to assume that once Barnabas was ordered to get inside the coffin, that cross in the lid incapacitated him somehow even though the lid wasn't closed. Though if he was able to climb in with the cross there, one might wonder how it prevented him from climbing out.
But crosses exert weird powers on DS whenever the circumstances demand it. Like, say, when both [spoiler]Tom and Roxanne were held at bay by one to be destroyed by the dawn. And in Tom's case it wasn't even a real cross but two candlesticks held in the shape of a cross.[/spoiler]One might assume they could have simply disappeared to escape - but apparently they were incapable of doing so.