The touring side were bundled out for 227 in their second innings in the afternoon session, after being asked to follow on by the hosts.
Herath added three wickets to his previous day’s removal of opener Kraigg Brathwaite (34) after taking six wickets in the first innings. He finished with match figures of 10-147.
Debutant all-rounder Milinda Siriwardana and paceman Dhammika Prasad picked up two wickets apiece in the second innings for Sri Lanka.
Jermaine Blackwood played some delightful shots and showed nimble footwork against the spinners during his knock of 92, his second highest score in tests, but was the last man out.
After resuming on 67-2, West Indies lost nightwatchman Devendra Bishoo (10) in wily left-arm spinner Herath’s third over and then experienced batsman Marlon Samuels was out lbw off the first ball he faced.
Samuels did not offer a shot to a straight delivery and more surprisingly, decided to waste a review by challenging the umpire’s decision. The bowler’s hat-trick ball was fended away by Blackwood.
West Indies’ hopes of avoiding a heavy defeat rested on Darren Bravo (31), who scored a 50 in the first innings, but the left-hander edged Nuwan Pradeep behind after captain Angelo Mathews’ decision to allow the paceman one more over was vindicated.
Blackwood and wicketkeeper Denesh Ramdin (11) stitched together a dogged 48-run stand for the sixth wicket before Siriwardena ended the pair’s resistance when Ramdin edged a catch to Kaushal Silva at second slip.
The second match of the two-test series starts in Colombo on Thursday.