The Bank Rate / Discount rate is the interest rate charged by the central bank to member institutions for loans from the central bank. These are typically thought of as emergency funds to meet the liquidity needs of solvent banks with illiquid assets, thought since Bagehot to be properly set at a penalty rate to discourage abuse.* In contrast, the repo rate is the interest charged on repurchase / rehypothecation transactions, which are short term over-collateralized (e.g. \$100 collateral to borrow \$95) loans where a much larger set of institutions including banks, insurance companies, hedge funds, and others can participate on similar financial terms.
The discount rate is a policy rate where the repo rate is an emergent market price for funds. These rates are linked but not in a mechanical way. For example, if the discount rate were set very low, banks would prefer to borrow from the central bank than the collateralized loan market at the repo rate and therefore quantities and rates in the repo market would likely fall. Or it would if there weren't generally speaking a stigma to using the discount window to borrow at the discount rate. But if it were profitable maybe that stigma could be overcome. And there may be other differences like changes in terms or the suitable assets usable as collateral that make comparisons of rates imperfect.
This penalty explains the positive difference between the fed funds rate and the discount rate. If there were no penalty, banks would be indifferent between borrowing from other banks and the Fed’s discount window.
Is the Discount Window Necessary? A Penn Central Perspective (Calomiris (1993))
That is, banks would rather borrow from the Fed than each other, so the Fed sets its policy rate higher to push banks back into market sources of funds. Then only those shut out of such markets will avail themselves of such funding.