England were 320 for six in reply to Sri Lanka's 257, a lead of 63 runs, at stumps after Robson had made 127 in only his second Test.
But with England on the verge of taking command, Sri Lanka fought back with three wickets late in the day.
And both Matt Prior (three not out) and Chris Jordan (four not out) were dropped before the close.
"It was a special day, I got a bit of a start last night but I just wanted to fight hard this morning and get us into a decent position," 24 year-old Robson told Sky Sports.
Robson's debut, in the drawn first Test of this two-match series at Lord's, his Middlesex home ground, had yielded scores of just one and 19.
"My debut at Lord's was unbelievable, a bit overwhelming in some respects, so I was looking forward to coming up here and focusing on the cricket rather than the party, as it were," Robson explained after scoring a century witnessed by a Headingley crowd that included both his Australian father and English-born mother.