National Football League Commissioner Pete Rozelle, quarterbacks Joe Namath and Roger Staubach, running back O.J. Simpson and old-timer Frank Gatski have been elected to the Pro Football Hall of Fame, it was announced today.

The five will be inducted into the Hall of Fame Aug. 3, before the NFL's first 1985 exhibition game, between the Houston Oilers and New York Giants. Their selections increase the shrine's membership to 128.

The five were chosen from an original list of 15 finalists, which was cut to seven last week. Failing to make it from the final seven were running back Paul Hornung and quarterback Fran Tarkenton.

Simpson and Staubach were elected in their first year of eligibility, five seasons after their retirement in 1979. Old-timers must have left the sport before 1960.

Rozelle, 58, has served as NFL commissioner for the past 25 years after his tenure as general manager of the Los Angeles Rams. He is the third NFL commissioner to be named to the Hall of Fame, joining 1963 charter members Joe Carr and Bert Bell.

Rozelle, a native of South Gate, Calif., negotiated the first league-wide television contract in 1962, handled the 1963 gambling scandal, directed an interleague war with the old American Football League that led to the current merged alignment, and developed the Super Bowl.

Namath, 41, the first New York Jets player to be selected, is best remembered for his bold victory prediction and performance when the Jets beat the Baltimore Colts, 16-7, in Super Bowl III in 1969. After playing for the University of Alabama, Namath signed a $400,000 contract with the Jets in 1965. He was rookie of the year and in 1967 became the first quarterback to pass for 4,000 yards in one season.

"He's the greatest athlete I ever coached," the late Bear Bryant once said of Namath, whom he coached at Alabama.

In 13 pro seasons, Namath had 1,886 completions for 27,663 yards and 173 touchdowns despite numerous knee injuries.

Staubach, 42, will join Bob Lilly as the only Dallas Cowboys players in the Hall of Fame. Staubach, the 1963 Heisman trophy winner at Navy, began his NFL career after four years of military service, including time in Vietnam.

In a nine-year period, Staubach played in six National Football Conference title games, leading the Cowboys to four victories. He also led the team to victories in Super Bowls VI and XII. His career pass rating of 83.4 was the highest in NFL history when he quit in 1979.

In Dallas, Staubach said, "This is something you dream about. It's fantastic. It is good to have it over with, a tremendous feeling. I wish my parents were alive to see it."

Staubach said he was uncertain he would get into the Hall this year. "When you talk to friends and other people, you think you have a chance. But they don't vote. I've understood in the past that the first time is difficult . . . This caps my career."

Simpson, 37, the 1968 Heisman trophy winner while at the University of Southern California, became the first NFL running back to gain 2,000 yards rushing in one season in 1973, when he had 2,003 with the Buffalo Bills. In 11 seasons with the San Francisco 49ers and Bills, Simpson gained 11,236 yards rushing.

The first player chosen in the 1969 draft, Simpson led the NFL in rushing four times and gained more than 1,000 yards in five consecutive seasons. He was a unanimous All-Pro selection five times. He and Staubach are the first Heisman trophy winners to be elected to the Hall.

Gatski, 62, joins 12 of his former teammates in the Hall, eight of them Cleveland Browns and four from the Detroit Lions. He played at Marshall for three seasons and one year at Auburn before joining the Browns in 1946. Both a linebacker and center early in his career, Gatski anchored a Cleveland line that powered pro football's most potent offense during the 1940s and 1950s.

Gatski played in 11 title games in 12 pro seasons, a record for a nonkicker. He never missed a game in high school, college or the pros.