This appears to be a manufactured quote for a PBS documentary on the American Revolution, created by condensing, rewriting, and paraphrasing portions of a lengthy letter James Madison wrote to Thomas Jefferson on 17 October 1788 http://oll.libertyfund.org/?option=com_staticxt&staticfile=show.php%3Ftitle=1937&chapter=118854&layout=html&Itemid=27, about the need for a Bill of Rights and the danger of an establishment of religion. The resulting "quote" profoundly changed the import of what Madison was trying to say and uses modern English. The phrases "biggest danger" and "tyranny of the majority" aren't even in the original letter. The relevant portions of the original letter are (italics in the original; bold added for emphasis):<blockquote>"… In Virginia I have seen the bill of rights violated in every instance where it has been opposed to a popular current. Notwithstanding the explicit provision contained in that instrument for the rights of Conscience, it is well known that a religious establishment would have taken place in that State, if the Legislative majority had found as they expected, a majority of the people in favor of the measure; and I am persuaded that if a majority of the people were now of one sect, the measure would still take place and on narrower ground than was then proposed, notwithstanding the additional obstacle which the law has since created. Wherever the real power in a Government lies, there is the danger of oppression. In our Governments the real power lies in the majority of the Community, and the invasion of private rights is chiefly to be apprehended, not from acts of Government contrary to the sense of its constituents, but from acts in which the Government is the mere instrument of the major number of the Constituents. This is a truth of great importance, but not yet sufficiently attended to; and is probably more strongly impressed on my mind by facts, and reflections suggested by them, than on yours which has contemplated abuses of power issuing from a very different quarter. Wherever there is an interest and power to do wrong, wrong will generally be done, and not less readily by a powerful & interested party than by a powerful and interested prince. …"</blockquote>
Misattributed