Invaders from Cupertino!

December 5, 2013, 11:55 AM UTC

Anthony Wood doesn’t come across as a paranoid kind of guy. The 47-year-old founder and CEO of Roku, with his French-blue button-down shirts (no jacket, please), rounded features, and relaxed demeanor, is an understated pitchman for his product, which lets consumers stream online videos and content from sites like Netflix and Amazon on their TVs. His modest work-life philosophy — he likes his employees to come in, do their work, and go home to their families — is the opposite of the hard-driving, all-consuming work ethic of many Silicon Valley companies. He is, it’s fair to say, a dolphin in a tank of sharks.

Yet Wood has every reason to be constantly looking over his shoulder. The company is the primary adversary to Apple in the burgeoning Internet TV business — an area where Apple may be planning to make a big, bold, game-changing move in coming years. “There is a very grand vision for TV,” Apple chief executive Tim Cook said at an industry conference in May 2013. “I have nothing to announce, but it is an area of incredible interest.” Add to that the knowledge that one of Roku’s highest-profile partners, Netflix, is in talks with cable operators to bundle its content library with a cable service — an action that would potentially diminish consumer interest in Wood’s company — and it’s easy to wonder how the serial founder (AW Software, SunRize, iband, ReplayTV, BrightSign) gets a good night’s sleep.

Wood understands that it isn’t easy being in Apple’s cross hairs, calling their rivalry a “ground war.” But going up against Apple “is not intimidating,” Wood says. “The way you can be successful against a large company that’s as powerful as Apple is you have to be first. You have to be ahead of the market and building up your brand and get known for something, and we did that. Whether that was strategy or luck, we were first.”

The problem? Apple has a reputation for entering a party fashionably late, then stealing everyone’s attention. Over Apple’s history, few small competitors have been able to fend off the company once it decides to expand into their core market. Rhapsody offered music libraries well before iTunes arrived, but its market share today lags behind Apple’s 63%, according to recent data from the NPD Group. And try to name another maker of portable music players. SanDisk is actually No. 2 behind Apple — not that most people would know that — with a market share of slightly less than 10%. Since iTunes Radio was introduced earlier this year, even popular music streamers like Pandora and Spotify now find themselves in Apple’s line of fire.

Rather than obsess over share, Wood focuses on value and usage. Wood used to hold a weekly strategy meeting to talk about what Apple was going to do and what Roku could do to prepare. He decided on using a low price as a way to compete. “We maniacally focused on cost,” he said. Then Apple lowered the price of its device to $99.

On to engagement, then. When it comes to viewership as measured by minutes streamed, Roku accounts for about 40% of the market, compared with Apple’s 25%, according to recent research by Parks Associates. Roku owners stream twice as much weekly video as Apple TV owners, according to the NPD Group. And Roku adds two to three new channels (some free, some premium) every day to its library of content.

Driven by a mission to get more performance out of less expensive hardware, Wood hopes the momentum carries forward. “At the core of my management style, I’m very product-focused,” he says.

Apple offered no comment on Roku’s success except to reiterate the number of Apple TV units it has sold to date: 13 million worldwide, compared with Roku’s 5 million, primarily in the U.S.

Size can matter. “Consumers understand Apple’s ecosystem,” says Dan Rayburn, a principal analyst at the market research firm Frost & Sullivan, referring to the ease with which Apple customers can transfer content from the online iTunes store to their Apple devices. The perk may not be enough to tip the scales in the battle for the streaming-television market, though. “One [device] is not better than another,” Rayburn says. “It all depends on what you want to do with it. It’s not one size fits all.”

When Fortune visited Roku’s offices in Saratoga, Calif., it was clear that the company’s efforts are paying off. Its campus now extends across an office complex into a shopping center. Inside, framed Roku advertisements hang from the walls. One says, “Books. They make great movies.” Another: “Insomnia just got better!”

While Roku’s partners vie to get on the list of channels for the company’s signature device, its own engineers are working to install Roku software directly on standalone TVs, eliminating the need for an external box altogether. Wood’s dream is for all television to be streamed in the future. His challenge is making sure that Roku remains relevant as other interested technology companies enter the fray.

With the support of an enthusiastic fan base and a substantial piece of the market, Wood says that all he can do to fight Apple is focus on his original goal, a sort of multimedia fever dream in which “every TV show ever made, every movie ever made, will be available for you to watch on demand.” All you’ll need to do is stay awake.

This story is from the December 23, 2013 issue of Fortune.