Former Congressman Barney Frank on Thursday said that he's grateful Apple CEO Tim Cook announced he's gay.

Cook, long rumored to be gay, broke his silence on his sexuality on Thursday in an essay published in Bloomberg Businessweek.

“I'm proud to be gay, and I consider being gay among the greatest gifts God has given me,” Cook, 53, wrote.

(Related: Tim Cook: Being gay “among the greatest gifts God has given me.”)

Appearing on CNBC's Squawk Box, Frank, who became the first openly gay member of Congress when he came out publicly in 1987, said that Cook's coming out will help others struggling with their own sexuality.

“When the man who has been the leader for several years with great success of one of the most important … businesses in America, says, 'Oh by the way, you know those people about whom you have these negative feelings, well I'm one of them.' That does such an enormous amount to diminish the negative feelings,” Frank said.

“I am very grateful for him doing it,” he said.

Frank added that the modern gay rights movement was aided by the coming outs of millions of Americans.

“The progress we've made in 50 years is enormous,” he said. “It's been the process of millions of Americans telling their friends, their relatives, their customers, their patients, etc., who we are. That we're gay.”