The 32-year-old, who began his career at Sunderland, will sign a one-year deal at Oakwell with the option of a further 12-months.
Preece has played in Denmark for the last six years with Silkeborg and latterly OB Odense.
Tykes manager Simon Davey told the club's official website: "David has done very well training with us and has all the attributes needed to be a quality goalkeeper in the Championship.
"We're delighted to have brought him here to Oakwell. David has the experience and the ability to provide healthy competition for Luke Steele."