The Sky Sports presenters were recorded making the off-air comments about official Sian Massey, 25, ahead of Liverpool's 3-0 victory over Wolverhampton Wanderers on Saturday afternoon.
According to a recording hosted by The Mail On Sunday, Keys said: "Somebody better get down there and explain offside to her."
Gray replied: "Can you believe that? A female linesman. Women don't know the offside rule."
Keys agreed: "Course they don't. I can guarantee you there will be a big one today. [Liverpool manager] Kenny [Dalglish] will go potty.
"This is not the first time, is it? Didn't we have one before? Wendy Toms."
He later made a reference to a recent column by Apprentice star and West Ham United vice-chairman Karren Brady, who claimed to have "experienced sexism at its rankest" in football.
"No, it's got to be done - the game's gone mad," Keys said. "Did you hear charming Karren Brady this morning complaining about sexism? Do me a favour, love."
Brady told the newspaper: "I think this just sums up everything I said in my column."
When contacted by The Mail On Sunday, Keys said: "I have no recollection of that. I have no idea what you are talking about. My recollection is that I wished the young lady all the best... If you have a tape then you don't need me to talk to you."
A Sky Sports spokesman said last night: "The comments reported today are not acceptable. They were not made on air or broadcast in any way but we have spoken to Richard and Andy and told them our views. They have apologised and expressed their regret."