The inverse coefficient problem of recovering the potential q(x) in the damped wave equation m(x)utt + μ(x)ut = (r(x)ux)x + q(x)u, (x, t) ∈ ΩT := (0, ℓ) × (0, T) subject to the boundary conditions r(0)ux(0, t) = f(t), u(ℓ, t) = 0, from the Dirichlet boundary measured output ν(t) :=u(0, t), t ∈ (0, T] is studied. A detailed microlocal analysis of regularity of the direct problem solution in the subdomains defined by the characteristics as well as along these characteristics is provided. Based on this analysis, necessary regularity results and energy estimates are derived. It is proved that the Dirichlet boundary measured output uniquely determines the potential q(x) in the interval [0, h(T/2)] and this solution belongs to C(0, h(T/2)) with T < T∗, where h(z) is the root of the equation z = ∫h(z)0 √ m(x)/r(x) dx, T∗ = 2 ∫ℓ0 √m(x)/r(x) dx. Moreover, the global uniqueness theorem is proved. Compactness, invertibility and Lipschitz continuity of the Neumann-to-Dirichlet operator Φ [·] :Q ∪ C(0, ℓ) → L2(0, T), Φf [q](t) :=u(0, t; q) is proved. This allows us to prove an existence of a quasi-solution of the inverse problem defined as a minimum of the Tikhonov functional J(q) :=(1/2) ||Φf [·]. ν||2L2(0,T) as well as its Fréchet differentiability. An explicit formula for the Fréchet gradient is derived by making use of the unique solution to corresponding adjoint problem. The proposed approach is leads to very effective gradient based computational identification algorithm.