A gerund cannot, because by definition it is an '-ing' form used as a noun. The form can arguably appear as an adverbial, however, as in 'I sat thinking of my old girlfriend'.
Gerunds and participles belong to the class Verbal because they carry verb-like morphology (-ing, -ed). In terms of syntax, though, they function as nominals.