AT&T (T -0.17%) stock has struggled in recent years, but Barclays analyst Kannan Venkateshwar believes the company deserves a higher valuation, considering the recent subscriber gains for its wireless and fiber services. The analyst upgraded AT&T stock from an equal weight (hold) rating to overweight (buy) but left the price target unchanged at $20. This still represents upside of 18% from the current share price of $16.89.

Why buy AT&T stock

Although investors usually buy telecom stocks for their dividends, AT&T has suffered from poor execution and uncertainty around the future of cable. It may offer shareholders an attractive 6.5% yield, but the stock has consistently underperformed the S&P 500, even on a total return basis. But the company's first-quarter earnings report showed new signs of life for the company.

Building on the previous quarter's gains, the company reported solid increases in postpaid phone and fiber subscribers in the first quarter. Revenue and adjusted earnings were slightly down year over year, but operating margin was up and free cash flow improved from $6.7 billion to $7.5 billion.

Management sees quality growth in its postpaid phone additions, with revenue and profits up on a per-user basis. The company is also experiencing growing demand for its fiber offering, where subscribers grew by 1.1 million to nearly 8.6 million over the last year.

Meanwhile, the stock is down over 25% in the last five years and trading near its lowest valuation over that time frame. Its enterprise value (EV)-to-EBITDA (earnings before interest, taxes, depreciation, and amortization) ratio is currently 6.0 -- a discount to Verizon's multiple of 6.6.

AT&T's recent momentum could help the stock hit Venkateshwar's $20 price target, finally giving investors something to cheer besides the dividend.