The draw ended a run of five consecutive Premier League victories for Arsenal as their title defence suffered a rare early bump.
Things started going wrong when, under pressure from Joe Willock following a Riccardo Calafiori throw-in, Odegaard miskicked the ball and it was picked up by Newcastle and played through for Barnes to finish low past Raya.
The Arsenal keeper had suffered a blow to the head diving at the feet of Willock shortly before, and his thinking could certainly be questioned when he kicked the ball behind for a corner under pressure on 62 minutes.
Big Dan Burn was left unmarked from the set-piece, and his downward header caused a goalmouth scramble before defensive partner Thiaw slammed home from a yard out.
Raya then suffered a shoulder injury and had to be replaced by Kepa Arrizabalaga in a very worrying development for Arsenal manager Mikel Arteta.
They failed to build on dominating in the first half and Newcastle, rejuvenated after the break, deserved at least a point.
Arsenal are six points clear of second placed Brighton - who play at Hull on Sunday - while Newcastle stay 12th with 13 points from 11 matches.