Google (Nasdaq: GOOG), operator of the world’s largest search engine, is on a year-long roll.

Its shares surpassed $800 for the first time on Tuesday.

Overall, the shares advanced 1.8 percent to $806.85 in New York, for the highest closing price since the company went public in August 2004. The stock has gained 33 percent in the past year, compared with a 12 percent increase for the Standard & Poor’s 500 Index.

Google is benefiting as more advertisers place promotions on its website, buoyed by the growing number of users who access the service on smartphones and tablets. The company grabbed 67 percent of the search market in the U.S. in January, while rivals Yahoo! Inc. and Microsoft Corp. had less than 30 percent combined, according to ComScore Inc.

“This is just such a great business, and they so clearly dominate it,” said Martin Pyykkonen, an analyst at Wedge Partners in Greenwood Village, Colorado. “Google has got this knight-in-shining-armor that nobody can kind of penetrate.”

As Google has advanced, Apple Inc. has declined 8.4 percent over the past year. Apple, the world’s most valuable technology company, is trading at a 56 percent discount to Google on a price-to-earnings basis, according to data compiled by Bloomberg. That’s the widest spread since July 2006, about a year before the iPhone was introduced.

The milestone comes more than five years after Google’s shares initially hit $700. Not long after breaking that barrier in October 2007, the economy collapsed into the worst recession since World War II and Google’s stock tumbled into a prolonged malaise that eventually led to a change in leadership.

Besides enriching Google’s employees and other shareholders, the company’s resurgent stock is an implicit endorsement of co-founder Larry Page. He replaced his managerial mentor, Eric Schmidt, as CEO in April 2011. Google’s stock has risen by about 35 percent since Page took over. By contrast, the benchmark Standard & Poor’s 500 index has climbed by 15 percent over the same stretch. Most of Google’s gains have occurred in the past seven months.

The significance of crossing the $800 threshold is largely symbolic. If Google had its way, the stock wouldn’t even be priced near these levels. The company, which is based in Mountain View, Calif., had hoped to split its stock last year in a move that would have at least temporarily halved the trading price by doubling the total number of outstanding shares. But the proposed stock split was put on hold until Google resolves a shareholder lawsuit alleging that the stock split unfairly cedes too much power to Page and fellow co-founder Sergey Brin. Page and Brin have been the company’s largest shareholders since its inception. A trial on the lawsuit is scheduled to begin June 17 in a Delaware state court.

Assuming more investors wouldn’t have bought the stock had it split, the company’s market value probably wouldn’t have changed from its current level of about $265 billion.

There is little dispute among analysts that Google appears well positioned for many years of prosperity. The reasons: Its Internet search engine remains the hub of the Web’s biggest marketing network; its YouTube video site has established itself as an increasingly attractive advertising vehicle; and its free Android software is running on more than 600 million smartphones and tablet computers to create even more opportunities to sell ads.

The lower prices attached to mobiles ads have raised recurring concerns on Wall Street about the decline in the average rate paid for ads that run alongside Google’s search results. The company, though, is trying to reverse the trend with upcoming changes to its ad system that will prod more marketers to buy mobile ads when they are creating campaigns for desktop and laptop computers.

Opinions about Google weren’t as upbeat a few years ago. Although Google weathered the Great Recession better than most companies, its revenue growth slowed and its stock plummeted to as low as $247.30 near the end of 2008.

Things looked so bleak in 2009 that Google took the rare step of re-pricing stock options that had been doled out to its employees to give them a chance to make more money when the shares rebounded. The program allowed Google workers to swap their old stock options for new ones with an exercise price of about $308.

Even after the economy snapped out of the recession toward the end of 2009, Google’s stock began to lag the rest of the market. Investors began to wonder if the company was losing its competitive age as it morphed from a hard-charging startup to giant organization with thousands of employees working in dozens of offices scattered around the world.

At the same time, Facebook was emerging as the Internet’s fastest growing company in a meteoric rise. The social networking company had some people convinced it would eventually become a more important advertising vehicle than Google’s search engine.

Perceptions have changed since Page became CEO. Under Page’s leadership, Google has streamlined its decision-making and operations while closing dozens of services. It established its own toehold in social networking with the 2011 introduction of Google Plus.

Meanwhile, Facebook Inc. has lost much of the luster that made its initial public offering of stock one of the biggest in U.S. history. Since going public at $38, Facebook’s stock has sunk 25 percent.

By contrast, Google’s stock has never slipped below its August 2004 IPO price of $85.