The pair were heard agreeing before Saturday's Premier League match between Wolverhampton Wanderers and Liverpool that women "probably don't know the offside rule". Gray was fired from the broadcaster yesterday.
Keys tonight released a statement insisting that he is "deeply sorry" for saying the offensive remarks.
He commented: "It was wrong and should not have happened. I have thought long and hard and reached the decision that it is time to move on.
"Going forward without Andy would have been almost impossible. I am and will remain proud of our work with football at Sky Sports and grateful to the many people who have worked with me."
Keys earlier told TalkSport that "dark forces" had been at work in preventing him from making amends over the past few days.
Barney Francis, managing director of Sky Sports, added in a statement: "It is disappointing that Richard's career at Sky should end in these circumstances.
"However, Richard recognises that his comments at the weekend were unacceptable and we note that he has made a full and public apology."