Shares of Williams Companies (NYSE:WMB) have already rallied about 25% this year. However, the natural gas pipeline giant's stock could have even more upside, with one analyst believing it remains undervalued by as much as 20%.

That untapped upside adds to Williams Companies' appeal, since it also pays its investors an above-average dividend that currently yields 5.5%. Because of that, investors are getting paid very well to wait for that upside to materialize.

A light bulb next to stacks of coins and a calculator.

Image source: Getty Images.

Drilling down into the sum of the parts

An analyst at Raymond James recently upgraded Williams Companies stock from "outperform" to "strong buy," while setting a $32 share price target -- about 16% above its current trading price. The main factor driving that bullish view is the analyst's belief that Williams trades at a 20% discount to its "sum-of-the-parts" value, which is an approximation of what the company would be worth if it was broken up and sold off in pieces.

Williams' recent asset sales help back up that view. The company has completed three transactions involving gathering and processing assets over the past year, two of which were with strategic buyers while the other was with a pension fund. On average, the company sold these assets for about 14 times their EBITDA. These transaction values suggest that Williams' remaining gathering and processing assets could also be worth 14 times their EBITDA, if not more, since its Northeast gathering and processing operations are on track to growth their EBITDA at a 15% compound annual rate through 2021. For perspective, Williams Companies currently trades at an enterprise value to EBITDA multiple of about 11.5 times.

In addition to its valuable gathering and processing business, Williams owns the Transco pipeline system, which is the nation's largest natural gas pipeline by volume. The nearly 1,800-mile pipeline, which stretches from South Texas to New York City, has been rapidly expanding over the years. That has enabled the company to more than double the revenue it collects from this system in the last decade. Meanwhile, Williams has more growth coming down the pipeline, which should expand the system's revenue from its current level of less than $2 billion per year up to its target of $2.5 billion by 2022. This pipeline system's size and growth potential make it an extremely valuable asset.

Williams Companies also owns several other midstream assets, including infrastructure supporting deepwater oil and gas production in the Gulf of Mexico and natural gas pipelines systems in Florida and the Northwest. These assets provide the company with predictable cash flow and growth potential. As such, they could be worth more than the market currently values them as part of Williams.

An energy complex in the form of two people shaking hands.

Image source: Getty Images.

Private equity continues to pay a premium for midstream assets

While the public market value for midstream companies remains well below the historical average, private valuations are red hot. That's because private equity funds have loads of cash that they're using to buy midstream assets.

For example, last year oil giant Occidental Petroleum (NYSE:OXY) sold an oil pipeline system and export facility associated with the fast-growing Permian Basin to a private equity-backed company for 14 times EBITDA. That's well above the 8 to 12 multiple these businesses typically fetch in a sale. Occidental Petroleum is likely hoping that it can net a similar premium when it sells a portion of its stake in an MLP it will soon inherit.

Oil and gas producer Devon Energy (NYSE:DVN) experienced something similar when it sold its stake in EnLink Midstream (NYSE:ENLC) last year to a private equity fund. Devon was able to get $3.125 billion for its majority interest in EnLink Midstream, valuing the company at 12 times cash flow. For perspective, Devon Energy's valuation at the time was a mere seven times cash flow, which showed just how much more valuable some of its parts were to a private market investor.

Private equity funds don't seem to have any problem paying a premium price for midstream assets, which helps support the view that Williams' deserves a higher market valuation.

Proving its value

Williams Companies has sold more than $5 billion in assets since 2017. While the main purpose of those sales has been to improve its balance sheet, the company has also been able to cash in on the premium price buyers were willing to pay for these assets. These sales by Williams and others support the view that Williams trades at a discount to the underlying value of its assets. Shares of the company could therefore have significant future upside as the market narrows this valuation gap. That could enable investors to earn some big-time total returns when adding the company's high-yielding dividend.