Unless you have a lot of time then fly, after all Bali is quite a distance if you want to ship or sail. Fly to DMK with airasia and then one cheap flight to Yangon or Mandalay with air asia or Ygn with Nok air.
The train is possible from Bangkok to the border, but the Death railway end a bit before you reach Burma. The war put an end to it.
I would fly to Bangkok then you have many options, fly to Yangon, Mandalay or go across land border in Thailand, nearest post is near Kanchanaburi which is about 2-3 hours by bur/train from Bangkok. Or you can fly/bus to Mae Sot and cross border there. Note you will need a visa before going to the border.
Probably the cheapest way would be to take Airasia via KL to Yangon as there are some great promos if you book early.
We took the flight from KL to Yangon last year, think it took 3 hours. There are certainly no direct buses and if you did bus hop it would take maybe 4-5 days and cost more than flying once you bought your meals and overnight in hotels