Applied Materials Inc. shares gained in late trading Wednesday, after the semiconductor-equipment manufacturer reported record sales amid a global chip shortage and gave a revenue forecast that met expectations.