Other contributors have said "Does an apple a day keep the doctor away?" is the same question as "Is there any scientific evidence to back up the old saying an apple a day keeps the doctor away?". If you believe that these are not asking the same thing and should be answered differently, click here.
A blow between the eyes from any hard object such as an apple will keep away pretty much anyone away, even a doctor.
More seriously, the answer is sort of. Diets high in fruits such as apples have been shown to reduce the risk of heart disease, stroke, and a number of cancers, amongst many, many other diseases. However, the CDC and FDA currently recommend around 5 to 9 servings of fruits and vegetables per day to really acheive these benefits. So a single apple, while a healthy serving fruit, is probably only going to make a minor improvement in your health outlook, if any. However, making a serious effort to include 5 to 9 servings of fruits and vegetables a day in your diet, one of which that might be an apple, certainly would reduce your risk of developing a disease and keep the doctor away.