The sense of necessity (“needing to be read,” etc.) was a pragmatic outgrowth of the more basic meaning: a book that is readable or “disposed” to be read is one that probably should be read. The replacement of -undus by -endus was a late development under the influence of the present participle; older Latin still hasvertundus,legundus, etc.
The derivation from gerundive to the later gerund could then be as easy as an abstraction from “ad librum legendum” (“to the book to be read”) to “ad legendum” (“in order to read”).[1] Compare-bundus and-cundus.