United Press International had a lot more to celebrate last night than 75 years in the business. Its Poland correspondent, Ruth Gruber, had been freed in Warsaw yesterday after being detained 23 hours by Polish officials.

"It's obvious they were trying to get her out of there," said UPI president William J. Small. "She's a good, tough reporter, and if you don't have those folks in Beirut, Moscow and here in Washington, then the rest of it just fades out."

Small and about 250 others gathered last night for the opening of UPI's 75th Anniversary New Photography Exhibition. And if one picture is worth a thousand words, then words overflowed as news photographers scrambled to capture the image of Vice President George Bush paying tribute to their profession.

Passing slowly through the National Geographic Society's Explorers Hall, which was flooded with Secret Service agents, Bush scrutinized the photographs and shook hands with several guests in the crowd that included such veteran members of the press and press handlers as ABC anchor Ted Koppel, National Geographic President Gilbert Grosvenor and the first lady's press secretary, Sheila Tate.

"We politicians can rattle on and on," Bush commented on one 1974 photograph of a bloodied girl carried from a schoolhouse in Iran where 75 students were held hostage, "but here you see again with a clear vivid sense we know why we must strive for peace."

Bush, steering away from current politics, also talked about the various presidents portrayed in the exhibit--Harry Truman at the piano looking out coyly as actress Lauren Bacall perches above him, Helen Keller feeling President Eisenhower's face as they meet, President Reagan falling wounded in an assassination attempt. The news photo, he said, "reminds us that the presidency is not an abstraction, but a succession of fragile overworked men."

UPI's new management, there in force last night with part owners Len R. Small, Douglas Ruhe and William Geissler, shows promise of easing the service's longtime financial woes. After a few weeks of negotiations, UPI's management yesterday reached a preliminary contract settlement with its guild.

"It is just an initial agreement," said Len R. Small (no relation to William) about the negotiations. "It is a very positive development--a mutual and early agreement."