Getting to Pai and Back
Getting to Pai today is easier than ever. Even in the mid-nineties of the 20th century there was only a dirt track connecting Pai to the Thai road network. This remoteness had the advantage of diminished government control which fuelled Pai's erstwhile image as a drug haven that lingers in Thailand to this day. Sidenote: Never buy drugs in Pai or anywhere else in Thailand! More likely than not the "sellers" will be police informants!
The famous and infamous route 1095 connects Pai to the main Thai road network and is the gateway to Chiang Mai. While the nominal distance to Chiang Mai is only 123 kilometers, the trip will take at least three hours, by whatever mode of transport. A strong motorcycle is a real advantage.
This is due to the large number of curves. Many have counted them and the current number agreed upon is 762. Add to that frequent rapid altitude changes and mountain weather, the trip is enjoyable mostly for the drive through verdant forests with great mountain vistas, especially north toward the Chiang Dao range.
From Chiang Mai
Making your trip via rented scooter (or car) from Chiang Mai is very doable and an adventurous and enjoyable trip. The dangerous part is the 50 km stretch north from Chiang Mai to the turn to Pai. The curvy route 1095 is not dangerous if you drive carefully and have well-maintained bike with good brakes. Also, be sure to always brake carefully as the road can be slippery from vegetation debris and gravel.
The Pai was recognized as an important strategic point by the Japanese in WWII due to its access to the border areas with Burma (now Myanmar). So they built an airport that, after closing for a number of years in the 1980s, ist still going strong today. The airport is only 1.5 kilometers from town.
Kan Air has to be commended for running flights from Chiang Mai to Pai but check their web site as the service may be suspended temporarily or permanently at any time.
In March 2017 it was reported that the airports department is considering an expansion of Pai Airport to accommodate bigger planes: http://www.bangkokpost.com/news/transport/1211682/airports-department-mulls-pai-airport-expansion. It's early days and these announcements are made often in Thailand, while follow-through is lacking.
There are no rail tracks to Pai, until we see some crazy Chinese investors drilling through the mountains.