This paper is devoted to gradient-like flows on surfaces, which are Morse-Smale flows without limit cycles, and to their topological classification up to topological conjugacy. Such flows, otherwise called Morse flows, have been repeatedly classified by means of various topological invariants. One of these invariants is the two-colour Wang's graph, which is valid only for gradient-like flows on orientable surfaces. The purpose of this study was to generalize the Wang's graph to the case of arbitrary closed surfaces. A new invariant, the generalized Wang's graph, is introduced in the paper. Using this generalization, a topological classification of gradient-like flows on arbitrary surfaces is obtained, including a non-orientable case. The realization of the generalized Wang's graph by the standard Morse flow on the surface is performed as well. To obtain all the results, constructive method is used: to prove the classification theorem, a homeomorphism is constructed that maps regions with the same behavior of trajectories into each other, and the graph allows to establish the correct location of such regions relative to each other. The realization theorem is also proven constructively: basing on the graph being considered, standard flow is created that is topologically conjugated to every flow such that the graph corresponds to this flow. Thus, a complete topological classification of Morse flows on surfaces is constructed by means of an invariant, which in some respects surpasses in simplicity and practicality both the directed Peixoto graph and the three-colour Oshemkov-Sharko graph.