How did the writers come up with the name "Gallifrey"? Every name means something or is related to something. Most of the names in Doctor Who are related to mythology, history, religion, or classic SF literature. Gallifrey is not, at least to my knowledge.
I heard somebody ask about the name "Gallifrey" at a Doctor Who convention in the 1980s. John Nathan-Turner answered something to the effect that it was supposed to be suggestive of "gallimaufry," which was originally a word for a kind of hash dish, now normally used in the sense "a heterogeneous mixture, a confused jumble, a ridiculous medley" (per the Oxford English Dictionary).
There may have been more to Nathan-Turner's answer, but I don't remember. Now, one of my first thoughts as I thought back to this event was that the name of the Time Lords' world probably predated Nathan-Turner's work on the show, so he would not have been speaking from first-hand knowledge; but rather, it must have been something he himself had heard some years later. However, I then remembered that Nathan-Turner had actually worked on the show (as a low-level production assistant) all the way back during Patrick Troughton's tenure, and (as the show was always a favorite of his) stayed in close touch with the production staff of Doctor Who during the years he was working on other shows. So he may have had relatively contemporaneous knowledge of where the name came from, although he would not have been part of the naming process.
Although I cannot find proof of it anywhere, I had an idea that it could be a play/twist on the term "Galfridian", which is an adjective relating to Geoffrey of Monmouth, who is considered the founder of English historiography (the study of historical writing). Being that the show was founded on an idea to push science and history, this would make sense (to me, at least).
The word gallifrey might be taken from something or other to do with english public school terminology. I spoke to JNT at a dr who convention (80's) and he told me that the timelords are teachers (hartnell classics troughton physics pertwee poetry baker romance davison p.e.), the companions are the students and the daleks are..... MOM! Complete with skirt, bath plungers and air fresheners!