This poem (or an earlier version of it) is attributed to Benjamin Franklin. Its earliest known appearance was in the Poor Richard's Almanack of 1758:
A little neglect may breed great mischief:
For want of a nail the shoe was lost;
For want of a shoe the horse was lost;
and for want of a horse the rider was lost.
The Mother Goose version takes things a bit farther.