天方 was the old Chinese name for Arabia (specifically Mecca), and
夜谭 means 'night tales' — so
天方夜谭 literally translates 'One Thousand and One Nights' (Alf Layla wa-Layla). The collection's exotic, impossible-sounding tales gave the idiom its modern figurative sense: 'a yarn too tall to believe.'