Zebra is a medical slang term for a surprising diagnosis. Although rare diseases are, in general, surprising when they are encountered, other diseases can be surprising in a particular person and time, and so "zebra" is the broader concept.
The term derives from the aphorism "When you hear hoofbeats behind you, don't expect to see a zebra", which was coined in a slightly modified form in the late 1940s by Dr. Theodore Woodward, a former professor at the University of Maryland School of Medicine in Baltimore. Since horses are the most commonly encountered hoofed animal for most people and zebras are comparatively rarely encountered, logically one could confidently guess that the animal making the hoofbeats is probably a horse. By 1960, the aphorism was widely known in medical circles.
As explained by Sotos, medical novices are predisposed to make rare diagnoses because of: (a) the availability heuristic ("events more easily remembered are judged more probable") combined with (b) the well-known phenomenon, first enunciated in Rhetorica ad Herennium (circa 85 BC), that "the striking and the novel stay longer in the mind." Thus, the aphorism has a valid role in teaching medical students to be better diagnosticians.
Three master diagnosticians have noted, however, that cautions against making surprising diagnoses (e.g. of a rare disease) are not valid in practitioners with greater knowledge and experience:
In making the diagnosis of the cause of illness in an individual case, calculations of probability have no meaning. The pertinent question is whether the disease is present or not. Whether it is rare or common does not change the odds in a single patient. ... If the diagnosis can be made on the basis of specific criteria, then these criteria are either fulfilled or not fulfilled. -- A. McGehee Harvey, James Bordley II, Jeremiah Barondess
A related, but distinct, term for an obscure and rare diagnosis in medicine is fascinoma.
Other medical aphorisms 
- Sutton's law - perform first the diagnostic test expected to be most useful
- Occam's razor - select from among competing hypotheses the one that makes the fewest new assumptions
- Leonard's Law of Physical Findings - it's obvious or it's not there
- KISS principle - Keep It Simple, Stupid
- Hickam's dictum - "Patients can have as many diseases as they damn well please"
- Harvey, A. M., et al (1979). Differential Diagnosis (3rd ed.). Philadelphia: W.B. Saunders.
- Imperato, Pascal James (1979). Medical Detective. New York: Richard Marek. ISBN 0-399-90058-6.
- Sotos, John G. (2006) . Zebra Cards: An Aid to Obscure Diagnoses. Mt. Vernon, VA: Mt. Vernon Book Systems. ISBN 978-0-9818193-0-3.