- You may be looking for the sixth series of books in the Lethbridge-Stewart series.
The Laughing Gnome was an interface created by the Doctor for the Accord to allow them to interact with corporeal beings. (PROSE: Lucy Wilson and the Bledoe Cadets) It outwardly resembled a garden gnome, and had the capability to send souls back through time using astral projection, sometimes into other bodies. (PROSE: Fear of the Web, The Danger Men) It was also able to swap bodies for its victims if the host's body suffered a shock, placing them into the body of the person nearest to them. (PROSE: The Danger Men)
In 2011, the gnome was placed in a graveyard by "a time traveller of some renown". (PROSE: The Danger Men) This was later confirmed to be the Doctor; Bill and Anne believed it was a goodbye gift for the Brigadier, and they were simply caught in the temporal wake. (PROSE: Rise of the Dominator) It sent Alistair Gordon Lethbridge-Stewart back in time from 2011 to 1981. (PROSE: Scary Monsters) It later sent Alistair, Anne Travers and Bill Bishop back to 1969, (PROSE: Fear of the Web) this was followed by other trips, including 1999. (PROSE: The Danger Men) Several more trips followed, including to 2003. They eventually all arrived in 1973, where they finally met up again. Following this, Bill and Anne were returned to 2011, but not, it seemed, Sir Alistair. (PROSE: Rise of the Dominator)