A judge has ordered Google to hand over employee records to federal investigators probing the alleged gender pay gap at the Internet giant.