The Soviet Foreign Ministry today summoned Andrew Nagorski, Moscow correspondent for Newsweek magazine, and informed him that he was being stripped of his accreditation and given ''a reasonable time'' to leave the country. It was the first expulsion of an American reporter since 1977. An official statement said that Mr. Nagorski had engaged in ''impermissible methods of journalistic activities.'' The American Embassy issued a statement that implied that retaliation was being considered. The statement said: ''We regret that the Ministry of Foreign Affairs has taken this action against a responsible, well-qualified American correspondent and chosen to publicize it without giving him a chance to answer the charges. We are currently consulting with the State Department as to what action should be taken in response.''