Early versions of the phrase (in English literature) went this way: "make both ends (or two ends) of the year meet." From the beginning of the year to the end, you would live within your income (what you spend meets what you earn).