I assume that le devoir is derived from the verb devoir, as opposed to the other way around. Are there many other nouns derived from verbs, such that the noun is identical to the verb? Are these nouns always masculine?
There are plenty of such nouns:
To designate a period of time when people do a specific action in a day-to-day schedule (lever, déjeuner...)
To designate a specific notion, often (but not only) in philosophy, it can happen that a verb is directly used as a noun (l'être et le paraître, le savoir-faire, un avoir)
To designate a specific action (un lancer)
Some nouns are even perfect homonyms of verbs without a clear link between the two of them. Either one derived from the other a very long time ago or they just ended up being homonyms by the random of linguistic evolution (un boucher: a butcher, boucher: to clog)
As far as I know all these nouns are masculine, but I suspect you may find words of the last category that are feminine.
Yes there are many nouns derived from verbs :
Le bon vouloir Le coucher Le déjeuner / le dîner / le souper Le savoir
This pages affirms that infinitive verbs used as nouns are neither masculine nor feminine but neutral : http://research.jyu.fi/grfle/462.html I don't know if that can be trusted, but at least that sounds right.