Gunathilaka struggled at the start but then went on to score a half-century.
Dickwella and Gunathilaka continued from where left in the 3rd ODI.
As the openers raised 200, Dickwella helped himself to a century.
Waller managed to dismiss both the openers.
Zimbabwe fought back right at the death to keep Sri Lanka to 300 for 6.
Sri Lanka got off to a brisk start with Solomon Mire scoring a 34-ball 43.
However, Wanindu Hasaranga helped the hosts fight their way back in the game with quick wickets.
Sri Lanka delayed bowling 20 overs with the rain threat looming large but the umpires stayed long enough forcing the hosts to complete the mandatory overs in order to constitute a game.
After play resumed, Ervine scored unbeaten 69 to lead his side to a series-levelling four-wicket win by DLS method.