It's paid for by for every employee, with a ~50%/50% split between employer and employee, with the premium depending on gross income only.
You actually want insurance for this because you don't want, for example, small businesses avoiding fertile women because they "already have too many pregnancies right now". If all the employees had kids simultaneously (an irrelevant random event), it shouldn't cause a bankruptcy.
In practice, people aren't typically so fungible, but the insurance at least hedges the salary portion of the risk.
Losing someone with expertise/connections and onboarding someone new is a huge cost, though. Not just in the new person's salary, but in opportunity cost as that person slows down the people they work with in the process of getting up to speed.
I'd argue most of the companies will be able to handle that. Especially since you have plenty of time to prepare.
Above is only the part which is different for men and women for obvious biological reasons. There is also a paternity system leave starting from 2 months after birth but this should ideally not discriminate either gender.
The company will be reimbursed for the salary by the health insurance upon filling out a form. A company does not pay a single cent more than the cost of hiring another person for the position.