The England wicketkeeper hit 102 and shared an unbroken seventh-wicket stand of 138 with Tim Bresnan as the visitors closed on 329-6 at Chester-le-Street.
All of Yorkshire's batsmen reached double figures but only Bairstow and Bresnan (66 not out) went on.
Durham's highlight was Jamie Harrison's 2-62 in his first match of 2015.
Bairstow's 126-ball innings, which contained 16 fours, turned the day on its head after Yorkshire had been wobbling on 191-6.
Bresnan's equally attacking knock, off only 85 balls, was just as crucial and took his Championship batting average past 65 for the season.
Earlier Durham, who led second-placed Yorkshire by just nine points having played a game more in Division One, won the toss and decided to bowl first under overcast skies.
Alex Lees and Will Rhodes played watchfully to see out the majority of the morning session with an opening stand of 56 before Rhodes was bowled by Harrison who was making his return after 13 months out following a knee operation.
When Lees edged Graham Onions behind for 40 after lunch, wickets began to fall at regular intervals - including skipper Andrew Gale, who was out to a fine one-handed catch from opposing captain Paul Collingwood.
Yorkshire looked in danger of being bowled out for less than 250 when Adil Rashid became the sixth wicket to fall, edging Chris Rushworth to Collingwood at first slip.
But Bairstow and Bresnan's attack on a tiring Durham bowling unit put their side firmly on top and in with a chance of gaining maximum batting points.
Yorkshire wicketkeeper Jonny Bairstow:
"The way the openers applied themselves was fantastic. It was highly skilful. It set us up and you always know that one session here can change the game.
"I'm delighted with my own innings. I enjoy playing here - we had a lot of our own supporters here and the Durham fans gave me a good reception.
"Now we want to score as many as we can and make sure we can't lose the game."
Durham left arm-seamer Jamie Harrison:
"I'm just happy to be playing.
"I've had four years of struggling with injuries and it's been really tough."
Jonny Bairstow's superb unbeaten century led a lower-order recovery by Yorkshire on the opening day of their Championship match with leaders Durham.