The machines that carried people to the Moon are named after a piece of spinning equipment. A rocket is, in origin, a little bobbin.
The word is Italian. Etymonline gives rocchetto, "a rocket," literally "a bobbin," a diminutive of rocca, "a distaff." The Spectator's language column and Wikipedia give the feminine form, rocchetta, "little bobbin." Either way, the name comes from the spinning room.
The link is shape. Early gunpowder rockets were cylinders, tubes of pasteboard packed with flammable or explosive material. Etymonline says they were named for that cylindrical form. Wikipedia makes the same point: the shape resembles a thread bobbin.
The Italian word probably has a Germanic source. Etymonline reconstructs a Proto-Germanic rukkon-, from a root meaning "fabric, spun yarn." English once had a word for the same tool, rock, meaning a distaff, which the Spectator notes has nothing to do with the salad.
The term spread north. Wikipedia says the German writers Leonhard Fronsperger and Conrad Haas adopted it in the mid-16th century. English had rocket by the early 17th century, and Etymonline dates it to the 1610s. The Spectator's columnist puts the English sky-rocket a little earlier, no earlier than 1566.
The meaning then scaled up. Etymonline records the sense of a device driven by a rocket engine by 1919, in the work of Robert Goddard. Rocket-ship for space travel appears in Popular Science in February 1927. The verb, meaning to fly straight up like a rocket, dates from 1860.
The salad leaf is a different word that happens to look the same. Garden rocket came into English around 1500 through French roquette. Behind that, probably, lies Italian ruchetta, a diminutive of ruca, from Latin eruca. Americans now call the plant by another Italian form, arugula.
The bobbin still flies in modern idioms. Etymonline dates rocket scientist to 1952 and the figurative rocket science, meaning something hard, to 1985.