(Minnesota) If I contribute to the 529 account of a friend or relative who is not my dependent, can I still claim the 529 tax deduction or tax credit?
From: https://www.mnsaves.org/documents/mn_disclosure.pdf taken on 2019-09-24
Eligible Beneficiary Any U.S. citizen or resident alien with a valid Social Security number or taxpayer identification number.
Selecting a Beneficiary You must designate a Beneficiary on your Application (unless you are a state or local government or a 501(c)(3) tax exempt organization establishing a scholarship account). Anyone with a valid Social Security number or taxpayer identification number can be the Beneficiary, including you. You do not need to be related to the Beneficiary. You may name only one Beneficiary on your Account. You may establish only one Account for each Beneficiary. You may open additional Accounts for other Beneficiaries.
So it is pretty clear that any eligible person can be a Beneficiary of a 529. Do note that there are additional conditions if the Beneficiary belongs to another state and if the Beneficiary has income in a state not in Minnesota.
Also note that there are restrictions on the changing beneficiary is limited to 'Member of Family' of prior beneficiary (see document for details).
Assuming you meet the other income requirements for the tax credit (recapture provisions, income limits, gifting limits, etc.), you should be able to take it.
Update: OP asks about how does this related to Gift taxes and makes reference to a 529 plan not from MN.
Q: Can I take a tax credit if I'm a MN resident and don't contribute to the MN 529 Plan?
A: No, you need to use the MN 529 plan to get the credit. To my understanding the purpose of any state level tax credit is to incentivize state residents to contribute to their state 529 plan, by reducing the contributor's state income taxes. The link you provided in the comments is just for making it easy for others to contribute and makes no mention of tax advantage. Functionally that link is the same as: https://www.mnsaves.org/gift/contributions.shtml
Q: Is my contribution a 'gift'?
A: Any contribution made by you to a 529 plan where yourself is not the beneficiary would be considered a 'gift'. So any contribution to a son/daughter, niece/nephew, cousin, or unrelated person would still be considered a gift. The annual Federal gift exclusion is for 2019 at $15,000 per donee. So normally if you gift any one person more than $15,000 annually you are subject to Federal gift taxes. This gift IS NOT a Charitable Contribution that you make to the Red Cross or other qualified organization which has Federal tax and/or State tax implications.
The Minnesota Tax Credit can either reduce Federal declared income on the Minnesota State taxes by $1,500 (single)/$3,000 (married). Or claim it as a non-refundable credit on Minnesota taxes subject to income limits phase-out of half of the contribution up to $500.
So if you are single you will not get any additional tax value beyond $1,500. Or if you meet Minnesota income limits and go the MN credit route, won't get any MN credit value beyond a $1,000 contribution. You can still contribute more but won't get any tax advantage.
Note that these values are for ALL contributions to the MN 529 that you made to all donees which is still below the Federal Gift Tax limits of $15,000 per donee. So no Federal Gift Tax unless you are super generous.
Should you wish to contribute more than $15,000 per donee in a single annual period there is the option using lifetime gift tax exclusion, but the pros and cons should be left to a new question (or search this site).