Gray, 25, had been charged by the Football Association for bringing the game into disrepute over homophobic posts he made on Twitter in 2012.
He apologised and asked "for forgiveness" for the posts, saying he was now a "different person".
Both the club and the player have accepted the ban.
Gray's ban starts with Monday's Premier League game against Watford at Turf Moor and he will miss further fixtures against Arsenal, Everton and Southampton.
He has also been fined £25,000.
"We believe this charge, regarding historical social media posts, should now also serve as a warning to all professional footballers, and participants in the wider sporting field," Burnley said in a statement.
The tweets, which also contained offensive terms, were posted when Gray was playing for non-league Hinckley United.
They came to light on 20 August, the day he scored his first top-flight goal as he helped Burnley to a 2-0 win over Liverpool at Turf Moor.