In Universe:
The Jedi Order evolved from the earlier Je'daii Order.
"Observing the world around them, they saw two moons in the one sky—light Ashla and dark Bogan—and they understood the dual aspects to the Force, light and dark. The light defined the dark as the dark did the light. When balance was not maintained, Tython reacted to the imbalance with severe storms and quakes. And so the travelers defined themselves, ever seeking a balance. They became the Je'daii, a Dai Bendu term meaning "mystic center." Only through the harmony of balance could the Je'daii maintain a peaceful world."
- Ketu Quoted on Wookieepedia
Out of Universe:
There are a couple of theories:
For the word "Jedi," Lucas took inspiration from the Japanese term "Jidaigeki," which refers to a drama set set during the Edo period of Japanese history, when samurai were still in activity.
- Wookieepedia
And:
"Jedi", the name of the ancient knighthood, is a tip of the hat to Burrough's Barsoom, where lords bear the title of Jed or Jeddak.
The word "jedi" is thought to have been derived by George Lucas from the Japanese word jidaigeki, a genre of historical dramas, such as The Hidden Fortress, which influenced the development of Star Wars.
- Wikipedia
Lucas appears to have confirmed the link between "Jedi" and Burrough's Barsoom in a NY Times interview, which is the source of the Wikipedia quote regarding it.