The Supreme Court on Friday upheld a federal statute that bans gun possession by individuals who are subject to a domestic violence-related restraining order.