The word "before" is a preposition here. Refer to Oxford Dictionary and Cambridge Dictionary for grammar.
Before means During the period of time preceding (a particular event or time) and here's the explanation English Grammar Today:
Before as a preposition
We use before most commonly with noun phrases to refer to timed events.
However, "EnglishPractice" says that it is a conjunction here.
As a conjunction before means ‘previously to the time when’. The conjunction before joins two clauses together. Note that before and its clause can come either before or after the other clause. In subordinate clauses introduced by before we use a present tense to refer to the future.
- I will call you before I go. (NOT I will call you before I will go.)