Question: does khaki pants and gray shirt match?
Answer: Yes absolutely. Khaki is a very versatile color and matches with almost everything especially neutral shades such as blue, white,navy,black,grey. ... In your case a grey shirt is quite a good match.