According to JE Lighter, American Slang, it comes from the Italian compare. In American-Italian slang it means a “close or trusted male friend” and was popularized by Rocky Graziano, a boxer, who used to appear on the Martha Raye Show in the early 50’s.
He quotes it from the show as early as 1955.