Unknown time-varying parameters, including time-delay and system parameters, commonly exist in chaotic systems. These unknown parameters increase the difficulties in controlling the chaotic systems, and make most of the existing control methods fail to be applied. However, if these parameters can be estimated, they will facilitate the controller design. Therefore, in this paper, a parameter identification problem for a general time-delay chaotic system with unknown and time-varying parameters is considered, where these unknown time-delay and parameters are slow time-varying. It is very difficult to solve this problem analytically. Thus, a unified identification method is proposed to solve the identification problem numerically. To solve this identification problem, firstly, the time horizon is divided into several subintervals evenly. Then the time-varying parameters are approximated by piecewise constant functions. The height vectors of the piecewise constant functions are unknown and to be determined. Furthermore, the heights of the piecewise constant functions keep constant between each pair of the successive partition time points but switch values at the partition time points. After the approximation, the original identification problem for finding the nonlinear functions of the unknown parameters is transformed into a problem of selecting approximate parameter vectors, where the heights of the piecewise constan functions are unknown parameter vectors to be determined. Secondly, to solve the problem of selecting approximate parameter vectors quickly, the partial gradients of the objective function with respect to the parameter vectors are derived; and they are then integrated with a gradient-based procedure to obtain the unknown heights. As the number of partitions for the piecewise function increases, the optimal results of the approximate problem will approach to the optimal results of the original parameter identification problem. Hence, the optimal piecewise functions will approach to the real nonlinear functions for the unknown parameters. Finally, parameter identification experiments on time-delayed Mackey-Class and time-delayed logistic chaotic systems are carried out. The effects of the partition number on the estimated results are discussed. Numerical results demonstrate that when some switching times of the unknown parameters do not coincide with any partition time points, small error between the estimated results and the real values are present. However, these errors can be filtered and the estimated results are consistent well with the real values. Hence, the proposed method is reasonable and effective.