Can a foreigner obtain Norwegian citizenship by virtue of same-sex marriage to citizen Norway?

Yes. A foreign national can be granted citizenship in Norway if they are in a registered same-sex partnership with a Norwegian citizen, provided they meet the other requirements for citizenship, including residency and language proficiency.
Copyright Wanderlust World © https://www.ynyoo.com