Is wine dryness or sweetness due to grape variety? What divides a dry wine from a sweet wine is the level of residual sugar left in the wine after fermentation?
No, they are not related at all. Except when they are. Let me explain. There are a couple of ways to make a wine sweet. 


Ferment to dryness, filter and then add something sweet.
Make a wine with so much sugar that the yeast can't finish
Stop fermentation before it ends (filtering or alcohol) and leave some sweetness


Almost all grapes can be made into sweet wine by one of these methods, but not all of them are as tasty as others. Some grapes, like Riesling, can make both an excellent sweet dessert style wine and a dry wine. Then others like Cabernet Sauvignon are rarely made into sweet wine. It has to do with the tannins. The one exception to this is Port and Madeira where they make sweet wines from red grapes but these are meant to age.

So, to answer your question. No, sweet wines don't have to be related to a specific grape, but they are for taste purposes and not on the physical properties of the grapes.