What happened 

Shares of AT&T (T 1.10%) rallied on Thursday following bullish analyst remarks. As of 1:10 p.m. ET, the telecom giant's stock price was up more than 7%.

So what

It's been a painful year for AT&T's shareholders. But that may be about to change.

So says Morgan Stanley analyst Simon Flannery. Flannery placed an overweight rating on AT&T's stock on Thursday. With its share price down more than 20% in 2021 as of the market close on Tuesday, Flannery believes the dividend stock now represents an attractive profit opportunity for investors.

A person is pointing to a stock chart that rises, then falls, then rises again.

Image source: Getty Images.

Flannery said AT&T will become a more streamlined company focused on its core communications operations after it completes the merger of its WarnerMedia media business with Discovery. The transaction is expected to close by the middle of next year. 

Flannery argued that investors are currently undervaluing AT&T's wireless business, which is set to benefit from rising demand for 5G network services. But once investors begin to view AT&T as a purer play on the rapid growth of fifth-generation wireless solutions, he expects its share price to surge roughly 18%, to $28.

Now what

AT&T's $85 billion acquisition of Time Warner didn't work out as planned for shareholders. The cost and growth synergies the combined company was able to achieve failed to justify the deal's price tag in the eyes of many investors. From the merger's closing date of June 15, 2018, to today, AT&T's stock has underperformed the S&P 500 by a brutal 90%. 

Yet if Flannery is correct and AT&T can build a thriving 5G-fueled communications juggernaut, its stock could finally be poised for a comeback.