The on-loan midfielder curled home the only goal of the game in the 64th minute to give Wanderers an eight-point cushion on the bottom three and ensure Danny Wilson's first home game back in charge of Barnsley ended in defeat.
The home side, who were unlucky not to lead at the interval, remain bottom of the table after their 12th loss of the season.
Tykes striker Chris O'Grady curled wide of Bolton's goal in the opening minutes, prior to Barnsley captain Martin Cranie heading straight into the arms of Wanderers' goalkeeper Andy Lonergan from Tom Kennedy's free-kick on the quarter-hour mark.
Darren Pratley threatened at the other end in the 28th minute but the midfielder was flagged for offside well before he converted Chris Eagles' through ball past Barnsley keeper Luke Steele.
Steele, making his first appearance since September in place of recalled loanee Jack Butland, then had to be alert to turn away Danns' powerful drive from distance.
Barnsley veteran Bobby Hassell was denied the opening goal in the 36th minute when his thumping header from a Kennedy corner was beaten away by Lonergan.
The home side continued to press and Jim O'Brien forced a flying save from Lonergan with a thundering long-range shot before O'Grady stung the keeper's hands from the edge of the penalty area moments later.
Bolton came close to snatching the lead on the stroke of half-time when Steele denied Tim Ream's header from a Chris Eagles' corner before Pratley's follow-up effort was scrambled away on the line.
O'Brien forced another good save from Lonergan in first-half injury time, with Peter Ramage unable to poke home the rebound.
Bolton defender Zat Knight went close on the hour-mark with a towering header from Jay Spearing's left-wing corner, which was tipped over the crossbar by Steele.
The visitors were beginning to dominate and American defender Ream saw his powerful low drive from 25 yards turned away by Steele before Dougie Freedman's men broke the deadlock in the 64th minute through Danns.
Danns, on loan from Leicester, found space on the left-hand edge of Barnsley's 18-yard box to cut inside and curl an exquisite finish into the top right-hand corner for his fourth goal of the season.
Tykes manager Wilson, who returned to manage Barnsley on December 17 after leaving for local rivals Sheffield Wednesday in 1998, introduced attacking trio Paddy McCourt, Tomasz Cywka and Marcus Pedersen in search of an equaliser but the substitutes had little impact as Freedman's side maintained their slender advantage.