Ban has expressed a desire to visit Burma and press the generals to ditch the trial of opposition leader Aung San Suu Kyi and free all other political detainees. (Burma was renamed “Myanmar” by the military junta.)
Gambari, visiting the former Burma for the eighth time, returned to Yangon after a one-day trip to the new capital Naypyidaw, where he met Burmese Foreign Minister Nyan Win, according to state radio.
No other details were released in the radio report, which was the first mention in state media of Gambari's trip.
"He left Yangon by air to Bangkok," a Yangon-based diplomat told Reuters, requesting anonymity.
"We can be sure they explored the possibility of Ban visiting, but we don't know what the results were."
The Nigerian envoy, who made the 240-mile (385 km) car journey to Naypyidaw on Friday, returned to Yangon by plane early on Saturday.
He met Singapore's ambassador to Burma and United Nations officials before flying to Bangkok.
Diplomats at the U.N. have said Ban is concerned the junta will use any visit by him as propaganda to try to legitimise the trial of Suu Kyi, who is charged with violating her house arrest terms by allowing an American intruder to stay at her home.
The Nobel laureate faces five years in prison if found guilty of violating Section 22 of a now-outdated security law protecting the state from "subversive elements".
Critics have dismissed her case as a "show trial" to ensure she plays no part in planned multi-party elections next year, which are expected to entrench almost half a century of army rule.