First, just to be clear, SWIFT is an international institution that facilitates the clearing of wire transfers of money in international transactions between banks in much the same way that the Federal Reserve does when there are wire transfers between U.S. banks within the United States.
Like the Federal Reserve it is something of a public-private partnership, that is neither purely governmental, nor purely a for profit private company.
The question is how this is possible and what sort of political
factors allowed the Americans to have such a big control over a
non-U.S financial system?
It isn't really accurate to call SWIFT a "European" or "non-U.S. financial system." The U.S. has been part of the system since 1979 (just four years after it was established), and is home to one of four data processing centers that serve as the hubs of the network.
The legal foundation of SWIFT amounts to a multi-lateral treaty to which the U.S., many other nations, and a private company are parties, and Iran is not a party. So, its policies are to a great extent required to be acceptable to the nations that use its services.
Usually this isn't a big deal because most of its policies are technocratic details on matters like software standards, routing number formats, determining the exact minute at which a transaction clears and determining at what point in a transaction it can be undone for fraud.
People who want to transfer money to Iran electronically from a non-Iranian bank to an Iranian one, or visa versa, therefore, need to do so through an institution other than SWIFT. This is because Iran and its banks are not currently eligible to participate SWIFT, and because the U.S. would not agree to allow Iran to join if it sought to do so.
The U.S. has the practical (and probably also legal) ability to withdraw from its participation in SWIFT, and this means it can effectively veto any major policy changes it opposed. This is because it is absolutely necessary for the U.S. to be a willing participant for SWIFT to continue to operate, which is necessary for routine international commerce to be conducted. The volume of wire transfers between the U.S. and other SWIFT member nations is so great that an international payment clearing institution without U.S. participation would have only niche value, because the U.S. is such a large economy and such a major participant in international trade.