Mr Beattie published the post on LinkedIn – and the agency itself has described it as "tone deaf".
He wrote: "At Beattie Communications we don't hire blacks, gays or Catholics." He added that the company only takes on "talented people" and does not care about their skin colour, sexual orientation or religion.
He said he issued the post with the best of intent but accepted that the language was "inappropriate" and said he was "truly sorry" for the offence caused.
Mr Beattie founded the agency 40 years ago in Motherwell, before expanding it across the UK, with offices in cities including London, Leeds and Edinburgh.
Mr Beattie said: "My post was issued with the best of intent, but it did not take account of the complexities of creating a level playing field – of which I am well aware – and the language I used was inappropriate.
"I am truly sorry for the embarrassment I have caused the wonderful team across the business and our clients, and for the offence it has clearly caused.
"I have always hired people based on their potential, talent and ability, and done my best to equip them with the skills to succeed. It's a wrench to step down as chair but I feel I have no alternative. The time is right to go."
In the LinkedIn post Mr Beattie wrote that companies should only hire people for their "talent, experience, knowledge and wisdom". He added: "We hire people we like, trust and admire, and recruit people who have the potential to be better than us."
Beattie Communications said Mr Beattie is resigning from his position as chairman as a consequence of a "tone deaf" social media post.
The firm’s chief executive Laurna Woods said: "Gordon is devastated by the consequences arising from his LinkedIn post of last Friday, as is the entire Beattie team.
"There can be no excuses for the language he used or provocation exercised and he acknowledges that his actions, however well intentioned, were not only reckless, but out of touch.
"I'm personally saddened that he has chosen to resign as I have worked closely with him for 25 years and I can testify that he does not have a prejudiced bone in his body. But he was determined to draw a line in the sand so that the agency can look to the future."
Barrington Reeves, founder of Black Lives Matters Scotland and the Black Scottish Business Fund, is reported to have described the post as “tone deaf, insensitive, racist, homophobic and utterly unacceptable”.
Beattie formerly worked as a freelance journalist in Lanarkshire before building his PR firm. The company says it is the UK’s top integrated communications agency, adding: “We have a bigger geographic footprint than any rival, and at 32 years of age, we’re older than most.”