Soviet leader Mikhail Gorbachev, beginning a four-day visit here for consultations with Eastern European allies, held extensive talks with Hungarian leader Janos Kadar today and signaled increasing influence by Moscow over Hungary's reform-oriented economy.

Hungarian officials said Gorbachev and Kadar met for 4 1/2 hours, longer than planned, and discussed ways of expanding economic cooperation as well as issues of foreign policy. A communique reported "full identity of views on all issues," a phrase commonly used in Soviet Bloc statements to describe the most successful meetings.

The bilateral meeting opened a high-profile schedule for Gorbachev that will include another full day of activities with top Hungarian officials before a two-day summit meeting beginning Tuesday of the seven-nation Warsaw Pact, the Soviet-led military alliance.

The importance attached by Gorbachev to the visit and bilateral summit was suggested by the arrival of five other ranking Soviet officials who will hold press briefings on arms issues as well as the Chernobyl nuclear accident.

"We have much to do," Gorbachev said in an informal exchange with western reporters, which represented a break with custom.

Diplomats here will be watching for signs of Gorbachev's views of the Hungarian program of reforming its socialist economy through the removal of central controls and introduction of some of the market-oriented mechanisms of capitalism.

The communique after today's meeting offered no indication of tension over economic issues, saying that "friendship and cooperation between Hungary and the Soviet Union develop successfully." Instead, the statement stressed "mutual intentions to further extend the exchange of goods" and to accelerate schemes for joint investment and production, especially in the sphere of science and technology.

This emphasis on the "great importance" of "new cooperation reforms" appeared to reflect the pressure on Hungary to allow for a greater Soviet role in its economic development despite signs of reluctance by Budapest to participate in Soviet programs for joint development.