But they were made to pay for their missed chances when Cheltenham took the lead against the run of play on 20 minutes as Josh Low's cutback was stabbed home by Thornhill.
The Bees rallied and equalised 15 minutes later thanks to Albert Adomah's thumping drive into the top corner from the edge of the box.
Cheltenham should have moved back in front with their first attack of the second half but Theo Lewis sent a free header harmlessly wide.
Barnet then saw an O'Flynn strike ruled out for offside after 55 minutes. Ian Hendon's men thought they had won it 15 minutes from time when Adomah's first-time shot crashed off the underside of the bar but was adjudged not to have crossed the line.