SAN FRANCISCO — Travis Kalanick, the famously combative chief executive of Uber, took the stage at a Vanity Fair conference in San Francisco last October and quickly faced a prickly question. Why all the blunders at the company, Vanity Fair’s editor, Graydon Carter, asked. And had Mr. Kalanick learned anything?

Off in the wings of the auditorium, Bill Gurley appeared to tense.

Mr. Gurley has a lot riding on Uber. His venture capital firm, Benchmark, bought into Uber six years ago, when the ride-hailing company was a mere pipsqueak. Today, what was a 20 percent stake in Uber is worth billions.

More from The New York Times:
Sleepy Behind the Wheel? Some Cars Can Tell
Buying a New TV? Here’s How to Cut Through the Jargon
A Tweet to Kurt Eichenwald, a Strobe and a Seizure. Now, an Arrest.

Mr. Gurley is a rare figure, a Silicon Valley habitué who chides some of the biggest start-up stars to show some discipline and drop their arrogant behavior. That day in October, Mr. Kalanick passed Mr. Gurley’s test. He answered calmly, saying that he could learn from leaders who had failed in the past. “We’ve made mistakes,” Mr. Kalanick said. “We always find a way to learn and to get better.”

Mr. Gurley relaxed visibly.

Now, however, Uber faces precisely the kind of test Mr. Gurley has warned about. Former employees have said they were sexually harassed and discriminated against at the company. This month, Uber ended its use of a tool to thwart authorities in various cities who were trying to stop the ride-hailing service, after complaints that the behavior was unethical. Mr. Kalanick himself was caught on a video, which quickly went viral, in which he told one of Uber’s drivers that “some people just don’t want to take responsibility” for their own behavior, using an obscenity.

At the same time, Uber is facing business challenges — a tarnished image, legal difficulties and competition from rivals like Lyft — and is spending big to get around those issues. The company needs to resolve the controversies and get its business back on track.

Mr. Gurley has become deeply involved in that effort. In recent weeks, he has been active in a review of Uber’s practices, according to a person briefed on the discussions, who spoke on the condition of anonymity because the conversations are confidential. Mr. Gurley is also helping the company search for a chief operating officer. Throughout, Mr. Gurley has remained one of Mr. Kalanick’s few trusted advisers, and the two communicate several times a week, according to three people who have spoken with the men.

Helping to right the ship at Uber is a somewhat fitting role for Mr. Gurley, who for years has warned about excessive risk-taking on the part of start-ups. Going against the Silicon Valley orthodoxy, the venture capitalist has urged technology start-ups to go public as soon as they are able, instead of continuing to take venture capital funding: Taking on too much venture funding, he has said, can fuel a lack of discipline.

“Bill was the one who pushed hard for my company, Net Gravity, to be profitable at the height of the dot-com boom” in the late 1990s, said Thuan Pham, a tech entrepreneur who joined Uber in 2013 and is now chief technology officer. “It was a very unpopular stance. At Uber, he is willing to speak up too.”

Mr. Gurley, 50, didn’t respond to requests for comment on Uber. In one of three interviews last year, he said of his warnings for start-ups that “I say these things because the longer bad behavior goes on, the worse things end up.”

Uber declined to comment on Mr. Kalanick’s relationship with Mr. Gurley.

Mr. Gurley, who cuts a distinctive figure in Silicon Valley in no small part because of his lanky 6-foot-9 frame, went against conventional wisdom even before he became an investor.

The son of a NASA engineer, he grew up in Houston, obtained a computer science degree from the University of Florida, and worked at Compaq before joining the investment bank Credit Suisse First Boston in 1993 as a stock analyst.

A student of behavioral economics, markets and technology, Mr. Gurley became known on Wall Street for his nonconformist calls. In 1997, after joining Deutsche Bank, he downgraded Netscape Communications, then the wildly popular company behind the Navigator web browser, because he feared it was overvalued. The stock fell about 18 percent after his report. A year later, Netscape was acquired by AOL.

“He’s not pessimistic,” said Rich Barton, the founder of the real estate site Zillow, which Mr. Gurley also invested in. “He’s simply ahead.”

In 1999, Mr. Gurley joined Benchmark Capital, as the venture firm was known at the time. Benchmark was then on a hot streak, having initially invested $5 million in eBay in 1997 and reaped a more than 50,000 percent return after the online auction marketplace went public in 1998.

The firm underwent a rougher stretch during the dot-com bust in the early 2000s. Like many Silicon Valley venture firms, Benchmark watched investments — including in the online grocer Webvan and the online furniture retailer — tank.

Benchmark has since maintained a consistent string of investment hits. Mr. Gurley has been active, investing in GrubHub, the food delivery company; OpenTable, the restaurant reservation system; and Zillow, all of which went public. His partners’ successes include investments in Twitter, Instagram, Zipcar and, most recently, Snap, the maker of the ephemeral messaging app Snapchat.

For more than 20 years, Mr. Gurley has maintained a personal blog, called Above the Crowd, a reference to both his height and his point of view. It has been a primary channel through which he has made his prognostications.

Since 2014, the blog has tended to contain more cautionary notes about start-up behavior. In one post in 2015, as investors were pouring money into what became known as “unicorn” companies — venture-backed companies valued at more than $1 billion — Mr. Gurley wrote, “We are in a risk bubble.” Last year, he wrote that there would be “inevitable failed unicorns.”

Among Mr. Gurley’s main concerns are Silicon Valley’s growing self-importance, which he has said is expertly captured in “Silicon Valley,” the HBO show that lampoons the misadventures of several entrepreneurs who hope to strike it rich.

“The Valley reeks of entitlement,” he said in an interview last year. “It’s bad for the industry.”

Another of Mr. Gurley’s concerns relates to the way entrepreneurs have delayed initial public offerings. By staying private for as long as possible, these companies often operate without rigorous financial and operational controls, which is to their detriment, he said.

Mr. Gurley’s starkest warnings have been directed at the venture industry, now flush with more cash than at any time since the late 1990s. The flood of capital has allowed both good and bad companies to stay afloat, which Mr. Gurley said lets entrepreneurs engage in unsound business practices.

For example, start-ups are encouraged to compete with one another with price cuts and discounts when investors are willing to subsidize them. In the long run, however, price cuts are not a sustainable way to keep customers.

Thanks to all the easy money in the start-up system, “it could take years to know which business models really work,” Mr. Gurley said. For investors, that could depress returns, he added.

Such opinions have sometimes made Mr. Gurley less than popular in Silicon Valley. Marc Andreessen, a founder of Netscape who is now a venture capitalist and who has been optimistic about the start-up boom, once called Mr. Gurley his Newman, a reference to the annoying postal worker in the sitcom “Seinfeld.”

Mr. Gurley’s bearish outlook has also opened him to teasing. At his 50th birthday party last spring, his family poked fun at his distaste for unicorn companies with a slide presentation showing the investor secretly tending to a herd of the mythical creatures.

Some said they appreciate Mr. Gurley’s speaking out. Mr. Gurley is “calling B.S. on the relentless, blind confidence,” said Roger McNamee, a Silicon Valley investor, adding that it was “brave.”

That outspokenness has not meant Mr. Gurley is always right. In 2015, onstage at the South by Southwest festival, he said there would be “some dead unicorns this year.” None died that year. Since the end of 2015, the number of unicorn firms has risen to about 186 from 144, according to data from CB Insights.

When the e-commerce start-up garnered a $600 million valuation in 2015 before it had sold even a single item, Mr. Gurley tweeted his doubts and wrote “when I see this stuff I fear the end is near.” Last year, sold to Walmart for more than $3.3 billion, netting a big payday for investors. Mr. Gurley later said on Twitter that he had been wrong.

“He’s respected because of how he behaves when he’s wrong, and when he’s right, he makes the point in a way that makes everyone laugh,” Jon Sakoda, a partner at the venture firm New Enterprise Associates, said of Mr. Gurley. The firm was one of the backers of

Of all the investments that Mr. Gurley has made in tech start-ups, none are set to be as lucrative as Uber.

When Benchmark invested in Uber in 2011, the company was just two years old and its service had barely gotten off the ground. At the time, Mr. Gurley put $12 million into the company, which was then valued at $60 million. He also joined its board of directors.

Today, Uber is valued at close to $70 billion — about 1,100 times as valuable as it was when Benchmark invested — and has become the world’s most valuable privately held tech start-up.

Benchmark is known as one of Silicon Valley’s most founder-friendly venture capital firms, meaning that it doesn’t carve out special deals for itself at the expense of entrepreneurs and employees. With Uber, Benchmark agreed to let Mr. Kalanick and two of his colleagues have significant voting control over the company.

That has left Mr. Gurley with few levers he can pull for influence, though he is known for his deft touch with big personalities. Whether in a boardroom or around a poker table, “he ribs people and tells jokes,” said Nirav Tolia, the founder of Nextdoor, a local social networking company that Benchmark funded in 2011. “He loves people, and he has your best interests in mind.”

With Mr. Kalanick, Mr. Gurley is said to have a tight relationship. He is Uber’s most engaged board member and the closest thing Mr. Kalanick has to a consigliere, according to two investors who have spoken with both men. Mr. Gurley has helped guide Mr. Kalanick with Uber’s breakneck expansion into 72 countries in six years.

Yet in many ways, Uber now epitomizes many of the excesses Mr. Gurley has publicly condemned, and Mr. Kalanick has said he is in no hurry to take Uber public. Uber also does not have a chief financial officer and is unready for a public offering, despite Mr. Gurley’s past entreaties to prepare for the possibility, according to two people who participated in the conversations.

Worse, Uber has been spending prolifically, using price cuts to compete with rivals and barreling into new markets at a rapid rate. Mr. Kalanick has said that after the company entered China in 2013, Uber burned through about $2 billion in three years fighting a price war against the local ride-hailing incumbent, Didi Chuxing.

Mr. Gurley’s thinking has occasionally held sway at Uber. Last year, with its spending in China showing few signs of abating, many investors agreed that such losses would squash any hopes of a public offering, according to four people who participated in those conversations

Mr. Gurley held an informal meeting with Jean Liu, the president of Didi, in mid-2016, according to a person briefed on the get-together. Shortly thereafter, Mr. Kalanick, partly at the urging of Mr. Gurley, agreed to sell Uber’s China business to Didi, with Uber taking a stake in the resulting entity. It was a win for investors.

The experience was humbling for Mr. Kalanick. During the Vanity Fair conference, he told the crowd that he had been forced to rethink how he had done everything in China.

“You have to start from scratch,” Mr. Kalanick said. He called the foray an amazing corporate and personal journey that reinforced the Uber belief “in always improving” and “becoming a better version of yourself.”

In the shadows, Mr. Gurley smiled.