Your ledger or checkbook ledger matches what you have in the bank account. Way back in the stone age you had to balance your checkbook by hand by matching what the checking balance said in your checkbook ledger vs what the bank statement said. Usually, the two didn't match because of outstanding checks that didn't clear or some sort of entry error like transposing a digit. It was a pain in the ass and took a long time. Nowadays with software like Quicken, the software does much of the work for you.
It means the same thing in a business setting. All data entries for deposits and credits (payments) need to match what the bank says.
What does "balancing the books" mean?
Closing up of accounts at the end of an accounting period, by bringing the totals of their debit and credit sides into agreement, and thus to determine the profit or loss made during that period.