They supposedly mean the same thing, but they are often used in entirely different situations.
"Daunting" means to dishearten, but it is almost always used where a person or persons overcame or tried to overcome a difficult or dangerous task.
"He won, despite a daunting array of obstacles."
"He faced the daunting task of convincing the town council."
"Discourage" is used in a more negative sense, when it looks like the result is defeat.
"He was discouraged by the voter turnout."
"The sales have been discouraging for the economy."
Many times, the two are mixed, but not always, as the above examples show.