Brathwaite, 22, had only one Test wicket and three first-class scalps to his name before this game, but captured 6-29 with his part-time off-spin.
That helped bowl Sri Lanka out for 206, setting West Indies 244 to win.
Brathwaite was then lbw for three with the tourists 20-1 when rain ended play.
The Bajan right-hander had only bowled in six of his previous 23 Tests since his debut in 2011, taking a solitary wicket against India in Kolkata for an overall Test bowling average of 137.
His previous first-class bowling figures were equally forgettable, with three wickets at an average of 67 in 81 games.
But after he came on with Sri Lanka 146-4 to share the spin workload with Devendra Bishoo and debutant Jomel Warrican, Brathwaite took the last six wickets including home skipper Angelo Mathews, who was ninth out for 46.
With rain preventing any play after tea, Sri Lanka lead the two-Test series 1-0 after winning the first Test in Galle by an innings.
West Indies' Kraigg Brathwaite achieved the best Test bowling figures by an opening batsman for more than half a century on day three of the second Test against Sri Lanka in Colombo.