An invasion of armies can be resisted, but not an idea whose time has come.
Force can hold back soldiers at a border, but it has no defense against a conviction that has quietly taken root in many minds. Armies need roads, supplies and orders, while an idea travels in conversation, in print and in the private sense that something is finally right or finally overdue. The important phrase is "whose time has come." Hugo does not claim that every idea is unstoppable, only that some ripen when circumstances, need and imagination meet, and then no gate or decree can keep them out.
This fits Hugo's Romantic and liberal faith in progress. He was a lifelong republican who spent years in exile under Napoleon III, and he campaigned against the death penalty and for public education. He believed history bends toward ideas that widen human dignity. The exact wording in English is probably a loose paraphrase of a line attributed to him, so treat it as the spirit of his thinking rather than a verified quotation.
In everyday life, it can be a lesson in noticing. Say you run a small bakery and see customers increasingly ordering online. You can keep insisting that people should simply walk in, or you can accept that the shift is real and set up a basic ordering page. Resisting a tide wastes energy, while learning to move with it keeps your craft alive.