We know that density is equal to mass divided by volum, D=M/V and in this case we have 1 gallon of a solution of sulfuric acid with 37.4% of concentration in mass.
1 gallon is 3785.41 ml and according the formula M=D*V = 1.31 * 3785.41 = 4958.89 grams of solution.
Only 37.4% of the solution is sulfuric acid, that is 4958.89 * 37.4/100= 1854.62 grams
Then the number of grams of sulfuric acid is 1854.62 gr.