An unbeaten 66-run stand between Dickwella and Suranga Lakmal saw the hosts reach 227-7 at stumps on the second day after the Kiwis had earlier been bowled out for 249 runs in their first innings.
New Zealand started the day at 203-5 with Ross Taylor inching towards a 19th Test ton but the right-hander failed to add to his overnight score before he was caught-behind off the bowling of Lakmal.
Lakmal was in inspired mood in the morning session at Galle and the Sri Lanka seamer ran through the Kiwi tail after dismissing Taylor. Lakmal sent Mitchell Santner, Trent Boult and Ajaz Patel packing in a terrific spell with the visitors adding just 46 runs to their Day One total.
In response, Sri Lanka lost opener Lahiru Thirimanne early to the left-arm spin of Patel while Dimuth Karunaratne marched to 39 before falling prey to the same bowler.
Kusal Mendis and Angle Mathews put the hosts back on track with both the batsmen registering their half-centuries. Sri Lanka looked to be in command at 143-2 before Patel turned the game on its head with a flurry of wicket.
The Kiwi spinner sent dismissed Mendis and Mathews in quick succession before sending back Dhananjaya de Silva as well to bring up his second five-for in Test cricket. Boult removed Kusal Perera at the other end while William Somerville got the better of Akila Dananjaya as Sri Lanka slid to 161-7.
However, the visitors were frustrated for much of the final session at Galle with Dickwella and Lakmal leading a stubborn resistance which has reduced the lead to just 22 runs.
New Zealand first innings: 249 all out
Ross Taylor: 86
Akila Dananjaya: 5-80
Suranga Lakmal: 4-29
Sri Lanka first innings: 227-7
Kusal Mendis: 53
Angelo Mathews: 50
Azaj Patel: 5-76
Know more about Sport360 Application