Karoly Grosz, the first leader of Hungary to visit the White House in more than 40 years, began talks with President Reagan Wednesday to seek closer ties with the United States.

Grosz, who became prime minister and Communist Party chief in May, arrived at 11:30 a.m. EDT and immediately went to see the president.The Hungarian leader planned to ask Reagan to support his country's request for expanding economic ties, including agreement to sell Hungary high technology items.

The visit, including a working lunch, was expected to last about two hours.

Grosz told a National Press Club news conference Tuesday, "We want more democracy." He said that in December his government will propose laws spelling out specific rights such as freedom of assembly and association.

Under the proposed constitutional provisions, Hungarians should be able to do anything "unless the law specifically prohibits it," Grosz remarked.

Asked whether he could envision a multiparty system in Hungary, which has been ruled by the communists since 1948, he said, "One party or two parties is not a question of ideology. . . . What the future will bring, I do not know."

Grosz said all Hungarian citizens, except convicted criminals, already have the right to travel abroad and there has been a significant increase in travel to the West. But there have been unofficial reports that some opponents of the government have been unable to secure passports.

Grosz, 57, made it clear that he favors retention of his country's military pact with the Soviet Union as long as the West maintains its own alliance. He said he would favor a mutual reduction of forces, however.