The pair batted through the afternoon session here on Friday to lift the Proteas from the lunch score of 113-4 to 231-4 by tea on the opening day at the Sara Oval.
Left-handed Prince, watched by his Indian-origin wife Melissa from the stands, went to the break on 86 with 13 boundaries.
De Villiers was unbeaten on 88 with 17 fours as the pair defied the Sri Lankan bowlers, including star spinner Muttiah Muralitharan, to add 161 for the unbroken fifth wicket.
Muralitharan, playing at his home Tamil Union club, conceded 71 runs in 19 overs for a solitary wicket. Left-arm seamer Chaminda Vaas went for 1-58 from 13 overs.
The joy of winning the toss had seemed short-lived for Prince as the ball swung and bounced on the fresh wicket to reduce South Africa to 31-3 by the eighth over.
As the wicket eased up under the hot sun, Hashim Amla began the rescue act with 40 before Prince and de Villiers settled in to hammer the bowlers.
South Africa is seeking a series-levelling win after being thrashed by an innings and 153 runs in the first Test at the Sinhalese sports club.
Vaas, returning for Sri Lanka after missing the first Test due to a hamstring injury, struck with the second delivery of the match by trapping out-of-form opener Herschelle Gibbs leg-before.
Gibbs, who made 19 and 18 in the first Test, failed to bring his bat down in time and was beaten by a ball that went straight through and rapped his left pad.
Makeshift opener Andrew Hall edged a drive off Lasith Malinga and was caught at third slip by Tillekeratne Dilshan for no score.
Left-handed Jacques Rudolph, who made 90 in the second innings of the first Test, managed only 13 when Malinga scattered his off-stump with an express delivery.
Amla, dropped by wicket-keeper Prasanna Jayawardene off Malinga before he had reached double figures, made amends with seven delightful boundaries before falling to Muralitharan.
The off-spinner, who claimed 10 wickets in the first Test, deceived Amla in the air and trapped him leg-before on the back foot.
South Africa welcomed back veteran seamer Shaun Pollock, who opted out of the previous Test following the birth of his second daughter. Pollock replaced fast bowler Andre Nel.
The South Africans wore black bands on their arms to mourn the death of Soloman Makosana, the president of the Western Province Cricket Association, in Cape Town early Friday.
English umpire Mark Benson, who was due to stand in the match, flew home after falling ill during the first Test and was replaced by Pakistan's Aleem Dar. Billy Bowden of New Zealand is the other umpire.