Batting first, Canada got off to an excellent start as Gunasekera (57) and Patel (62) added an excellent opening stand of 75 in the opening power play overs.
However, no Canada batter could go on to make a really big score, as Mohammad Nabi (4-31) and Dawlat Zadran (3-49) restricted the home side to 230 all out in 44.5 overs.
In reply, Shabir Noori led the way for Afghanistan with a brilliant 94, receiving good support from Mohammad Nabi (58) and Nawroz Mangal (34).
Afghanistan suffered a late collapsing going from 183-3 to 207-8, losing three wickets in the space of one dramatic over, but Samiullah Shenwari and Mirwais Ashraf were able to guide the team home.
Hiral Patel recorded career-best figures of 4-28, as Rizwan Cheema took 3-53.