Divagate hasn't wandered far in meaning from its Latin ancestors. It descends from the verb divagari, which comes from dis-, meaning "apart," and vagari, meaning "to wander." Vagari also gave us vagabond, meaning "a wanderer with no home," and extravagant, an early, now archaic, sense of which was "wandering away." Latin vagari is also probably the source of our noun vagary, which now usually means "whim or caprice" but originally meant "journey, excursion, or tour." Even the verb stray may have evolved from vagari, by way of Vulgar Latin extravagare. Today, divagate can suggest a wandering or straying that is literal (as in "the hikers divagated from the trail"), but it is more often used figuratively (as in "she divagated from the topic").
Word History
Etymology
Late Latin divagatus, past participle of divagari, from Latin dis- + vagari to wander — more at vagary