Question: is bahnhof masculine or feminine?
Answer: "Hof" is masculine, that's why "Bahnhof" is masculine, too. "Tür" is feminine, that's why "Haustür" is feminine, too, etc.