"So let me be clear: I'm proud to be gay, and I consider being gay among the greatest gifts God has given me," Cook said in an article he wrote in Bloomberg Businessweek published on Thursday.
"I don't consider myself an activist, but I realize how much I've benefited from the sacrifice of others," he said.
Cook's statement makes public a fact long known but rarely discussed openly in California's close-knit Silicon Valley technology community.
A popular gay and lesbian magazine, Out, placed Cook at the top of its annual top 50 list of gay people in 2013.
"As the first CEO of a Fortune 500 company to reveal he is gay, Tim helps make the business world a bit less homophobic," Marianne Duddy-Burke, executive director of gay rights organization DignityUSA told Reuters in an email.
"I'm sure this will make it easier for some others in similar positions to consider coming out."
The fact the chief executive of the biggest U.S. publicly traded company felt he could disclose his sexual preference in such a public way, and with the backing of his chairman, shows how times have changed in the past few years.
Former BP Chief Executive Lord Browne, who kept his sexual orientation secret for decades, was forced to come out after a boyfriend made it public in 2007, and he later resigned.
"By deciding to speak publicly about his sexuality, Tim Cook has become a role model, and will speed up changes in the corporate world," Browne said in an email to Reuters on Thursday.
It remains to be seen whether Cook's disclosure will affect the company's business in conservative markets such as Russia, Iran and Africa.
The reason Cook chose this moment to go public is also unclear, but it comes at critical time in American history when a debate is raging over the legality of gay marriage.
While never broadcasting his sexual orientation, Cook has frequently spoken out against discrimination of the lesbian, gay, bisexual and transgender (LGBT) community, most recently this month when he addressed a group in his native Alabama.
Now, he is at least the third CEO of a publicly listed U.S. company to come out of the closet.
C1 Financial Inc's Trevor Burgess and IGI Laboratories Inc's Jason Grenfell-Gardner have previously acknowledged that they are gay.
Cook's disclosure was greeted by a flood of congratulatory comments on Twitter.
"I have so much respect for this man," a person identifying himself as Andrew Clarke tweeted.
Apple Chairman Art Levinson said Cook's announcement was "courageous."
"(His) decision to speak out will help advance the cause of equality and inclusion far beyond the business world," Levinson was quoted by CNBC as saying.
"On behalf of the board and our entire company, we are incredibly proud to have Tim leading Apple."
Apple has a long history of supporting the LGBT community.
Earlier this year, the company criticized an Arizona bill that would permit businesses to refuse service on religious grounds, a measure that critics said could allow discrimination against gay people.
"...I will personally continue to advocate for equality for all people until my toes point up," Cook said in the article.
"Plenty of colleagues at Apple know I'm gay, and it doesn't seem to make a difference in the way they treat me," he added.