Federer seeks his first singles medal, although he and Swiss teammate Stanislas Wawrinka did win the gold in doubles in 2008.
Back on his favorite stage Saturday, the top-ranked Federer was a point from victory in the second set, then lost three of his next four service games. But Federer was in fine form at the finish on the same Centre Court where he won Wimbledon for a record-tying seventh time less than three weeks earlier.
American John Isner won in his first Olympic match, making the most of a 15-inch height advantage to beat Olivier Rochus of Belgium, 7-6 (1), 6-4. The 6-foot-9 Isner had 24 aces; the 5-6 Rochus had one.
"A little bit of a David and Goliath thing," Isner said. "I knew I had to serve well, and that's what I did."
Two other U.S. men's players lost Olympic debuts -- Ryan Harrison and Donald Young. Isner and Andy Roddick were eliminated in doubles against Marcelo Melo and Bruno Soares of Brazil, 6-2, 6-4, while top-seeded Bob Bryan and Mike Bryan defeated Thomaz Bellucci and Andre Sa of Brazil, 7-6 (5), 6-7 (5), 6-3. The Bryans never lost serve.
Young remained winless since February when he lost to Andreas Seppi of Italy 6-4, 6-4.
The defeat extended the American's losing streak to 15 matches. He's 2-18 in 2012 but is still ranked 60th.
Crowds were smaller than for Wimbledon, with stands on the outer courts less than half full at the start of play.
Federer tried to downplay his drive to win a singles medal, but there's no question being ousted in the first round while ranked No. 1 would have been a bitter loss.
He was never on the verge of defeat of Falla but twice squandered leads. Federer seemed on his way to a routine win until Falla rallied serving at 3-5, love-40 in the second set.
"He hung tough, and I got nervous," Federer said. "It was a tough set to lose for me, particularly in the situation I was in. That's the beauty of the game. Sometimes you're one point away, and the next thing you know, you're 25 points away."
Federer also blew a 2-love lead in the final set, but had the crowd roaring with a succession of deft shots down the stretch. He's now 264 points from a gold medal.
Information from The Associated Press was used in this report.