Nationals right-hander Josiah Gray will have season-ending surgery for a partial tear of the ulnar collateral ligament in his pitching elbow.