What is the grammatical function of 'since' in the following sentence?
Four years had passed since his father died.
In this sentence since is used as a subordinating conjunction. It links together a main clause and a subordinate clause (an adverbial subordinate clause in this case).
From dictionary.com:
adverb 1.from then till now (often preceded by ever ): He was elected in 1978 and has been president ever since.
2.between a particular past time and the present; subsequently: She at first refused, but has since consented.
3.ago; before now: long since.
preposition 4.continuously from or counting from: It has been warm since noon.
5.between a past time or event and the present: There have been many changes since the war.
It's serving as a preposition. They state a relationship in space or time, literally or figuratively, and in this case it is in time and literal.