A time-fractional diffusion problem with a Caputo time-fractional derivative of order \(\alpha \in (0,1)\) is considered, the solution of which is typically weakly singular at the initial time. For this problem, we give an \(H^{1}\) -norm analysis of the stability and convergence of an integral-averaged L1 method on nonuniform time meshes. The averaging of the L1 scheme that we use is known as the \(\text {L1}^{+}\) or \(\overline{\text{ L }1}\) scheme. A new positive definiteness result for the integral-averaged L1 fractional-derivative operator is established. It improves the previous positive definiteness results in the literature and plays an important role in the analysis of \(H^ {1}\) -norm error of the integral-averaged L1 method. The \(H^{1}\) -norm stability holds for the general nonuniform time meshes, while the \(H^{1}\) -norm convergence is proved for the time graded meshes and the \(H^{1}\) -norm convergence order in time is \(\min \{3+\alpha , \gamma \alpha \}/2\) for all \(\alpha \in (0,1)\) , where \(\gamma \ge 1\) is the mesh grading parameter. Two full discretization methods using finite differences and finite elements in space are considered. The theoretical results are illustrated by numerical results.