By Tenzin Pema and Anya George Tharakan

(Reuters) - Though Apple Inc <AAPL.O> is selling enough iPhones to keep investors happy for now, the world's most valuable publicly traded company is set increasingly to rely on its apps and services to drive growth.

Apple's services business alone - which includes the App Store, Apple Pay and iCloud - will be "the size of a Fortune 100 company next year," Chief Executive Tim Cook said on a post-earnings call on Tuesday.

Revenue from the business rose 19 percent to about $6 billion for the third quarter, eclipsing sales of iPads and Mac computers for the second consecutive quarter to rank as Apple's second-largest unit after iPhones.

Apple's shares rose as much as 8 percent to $104.35 on Wednesday - its biggest percentage gain since April 2014 - adding roughly $42 billion to its market cap. The stock was the biggest boost to all three major indexes <.SPX> <.DJI> <.IXIC>.

Apple's shares closed up 6.6 percent at $103.03 on Wednesday.

The company on Tuesday reported higher-than-expected iPhone sales, though they declined for the second straight quarter.

As iPhone sales level off, Apple can utilize its existing base of users to wring more money out of its higher-margin services business, several analysts said.

With 1 billion devices in the hands of consumers, the size of Apple's installed base suggests it has plenty of room to grow in services. Services also promise a recurring revenue stream, unlike hardware sales.

"The growing iPhone installed base could enable Apple to grow its higher-margin services business through additional iTunes, apps and software sales, as well as through services such as Apple Pay and Apple streaming music service," Canaccord Genuity analyst Michael Walkley said.

At least six analysts raised their price targets on Apple's stock. Raymond James analyst Tavis McCourt raised his rating to "outperform" from "market perform" and initiated a $129 target. The median price target on the stock is $120.

App Store sales were a bright spot in Apple's third quarter, growing a record 37 percent, with most revenue coming from purchases of games.

Last week, brokerage Needham & Co estimated that Apple could get $3 billion in revenue from the Pokemon Go craze in the next one to two years as gamers buy "PokeCoins" from the App Store.

As more apps in other categories such as fitness, autos, home automation and education are developed, Apple stands to be a "prime beneficiary," said Macquarie analyst Ben Schachter.

"The App Store is, and we suspect will remain, the fastest-growing and highest-margin (Apple) business for the foreseeable future," said Schachter, who expects services revenue to hit $27.62 billion in 2017.

Services revenue, at 14 percent of total revenue in the third quarter, still pales in comparison with iPhone sales, which contribute about two-thirds.

Apple also faces intense competition from music service Spotify and cloud storage rivals Alphabet Inc's Google <GOOGL.O> and Microsoft Corp <MSFT.O>, as well as map makers that have won large audiences among iPhone users, even when Apple offers its own products.

Piper Jaffray analyst Gene Munster cut his price target to $151 from $153, reflecting a slightly lower profit estimate for 2017.

"Some of the true value in services may always go unrealized given that major businesses within other large Internet companies, like AWS in Amazon, Instagram/Oculus in Facebook, and YouTube in Google, are not fully appreciated in terms of value by investors," he said.

(Reporting by Tenzin Pema and Anaya George Tharakan in Bengaluru; Editing by Sayantani Ghosh and Robin Paxton)