The government departments that write banking law, own or recapitalize banks in a crisis, guarantee deposits as a last resort, borrow through banks and tax them.
Finance ministries are one player in the banking industry, and an industry of their own, with their own suppliers, customers, software, regulators, and money flows. This full map is on the roadmap.
Meanwhile: how finance ministries fit into banking