Both are considered correct, but "with" is more common than "to."
Think of it this way--when we use the verb "contrast," we'd almost always use "with," right? So we can't go wrong by using "with" in our writing, but we need to know for the GMAT that "to" is also acceptable.
Were you thinking of the other notoriously elusive one, "compare with" and "compare to"???