Galois hulls of linear codes have important applications in quantum coding theory. In this paper, we construct some new classes of (extended) generalized Reed-Solomon (GRS) codes with Galois hulls of arbitrary dimensions. We also propose a general method on constructing GRS codes with Galois hulls of arbitrary dimensions from special Euclidean orthogonal GRS codes. Finally, we construct several new families of entanglement-assisted quantum error-correcting codes (EAQECCs) and MDS EAQECCs by utilizing the above results.