England were 267 for eight in their second innings at stumps on the fourth day of the first Test, a lead of 389 runs.
The 24-year-old Ballance, entrusted with the key number three position in only his second Test, was 104 not out after going to his century in the last over of the day with a six off spinner Rangana Herath.
"It's a great feeling and I can't really describe my emotions right now," Zimbabwe-born left-hander Ballance told BBC Radio's Test Match Special.
He added: "We have put ourselves in a good position to win the game. Hopefully a few will keep a bit low and if we can nip one or two out we have a good chance."
More From This Section
Ballance had earlier added 78 for the seventh wicket with debutant Chris Jordan after a top-order collapse.
Sri Lanka now needed to surpass the highest fourth innings total to win a Test at Lord's -- 344 for one, requiring 342, by the West Indies against England in 1984 -- if they were to go 1-0 up in this two-match series.
"Until Ballance and Jordan got together, we had a chance (of winning).
"I'm not saying we're out of the game, but we have to bat sensibly."
Things looked very different as England slumped to 121 for six after Shaminda Eranga took three quick wickets and left-armer Herath followed up with a double strike of his own on the way to figures of four for 95 in 23 overs.
It was a collapse witnessed by Kevin Pietersen, watching from a sponsor's box at Lord's, with the South Africa-born batsman, England's all-time leading run-scorer across all formats, ditched after the 5-0 Ashes drubbing in Australia.