"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 the article.
"I don't consider myself an activist, but I realise how much I've benefited from the sacrifice of others," he said.
Cook is at least the third CEO of a publicly listed US 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 called Cook "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 lesbian, gay, bisexual and transgender (LGBT) community.
The company recently criticised 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.
"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.
Has Tim Cook FAILED to reshape Apple?
Apple's Cook stresses need to make workforce more diverse
The super yacht that Steve Jobs designed
Apple's Tim Cook says 'proud to be gay'
Apple's new iPads missing 'wow' factor