Gert Frobe, the German actor who starred as Goldfinger in the James Bond film of that name, died of a heart attack today in a Munich hospital. He was 75 years old.

Mr. Frobe appeared in nearly 100 movies, but was best known for his role as the greedy villain in the 1964 Bond film. He also appeared in the 1965 Hollywood movie ''Those Magnificent Men in Their Flying Machines'' and in Rene Clement's ''Is Paris Burning?'' in 1966. In Nazi Party, but Hid 2 Jews

Mr. Frobe's agent, Pal Berkovicsa, said the actor had suffered a heart attack about a week ago at a spa at Starnberger Lake near Munich.

In 1965, Mr. Frobe made headlines when he was quoted by the British newspaper The Daily Mail as saying: ''Naturally I was a Nazi.''