Meeting of the Minds

What does the idiom “meeting of the minds” mean?

Definition: Strong instinctive agreement on something

Example: At first the negotiations weren’t going well, but when the president of the company and I sat down over drinks, we had a real meeting of the minds.