Cultural note: the phrase comes historically from the Catholic Church and canonization, the process of declaring someone to be a saint. A saint is someone with a special holy status. The church recently declared Mother Teresa to be a saint.
The procedure for declaring someone a saint is "canonization." It includes a trial that resembles a legal trial. One of the requirements for being a saint is that the saint must have performed miracles. In the trial, the evidence for the miracle is judged. An "advocate" is a lawyer. The "Devil's advocate" is someone who has the job of giving reasons why the person should _not_ be canonized. For example, he would argue that the miracles weren't proven.
(In modern times, many of us are less likely to believe in physical miracles. This requirement for sainthood is more difficult than in the past. Mother Teresa was said to have been involved in two "medically inexplicable" miraculous cures of diseases).
As with real lawyers, the Devil's advocate probably believes that the person should be declared a saint, and is just doing the job that's assigned. Informally, that's what the phrase means. "Let me be devil's advocate" means "Please forgive me, I don't believe this, but to protect ourselves let's consider the opposite side."
As an example of use, "There would be less furor surrounding that government policy if only the leader had had a devil's advocate to point out the potential practical issues and legal problems in it."