The celebrated right-hander from Japan struck out 14 and appeared to be in complete control before Gonzalez smacked the first pitch up the middle. Darvish was unable to get his glove down in time and the ball skittered into center field well beyond a desperate dive by shortstop Elvis Andrus.
Darvish put up his hands - almost like, "Oh well, it happens." Texas' infielders immediately came to the mound, and manager Ron Washington joined them.
Washington patted Darvish on the chest and then signaled for a reliever. A crowd that included plenty of Rangers fans cheered Darvish as he walked off after 111 pitches. He sat on the bench to watch the rest of the game, and took part in the congratulations line when it ended.
Darvish became the first pitcher to lose a perfect game with two outs in the ninth inning since Armando Galarraga on June 2, 2010. Of course, the Detroit pitcher was denied only because of an infamous missed call at first base by umpire Jim Joyce, who later admitted he blew the play.
On the second full day of the major league season, Darvish nearly picked up right where baseball left off last year, when there were a record three perfect games, thrown by Philip Humber, Matt Cain and Felix Hernandez.
Darvish arrived in the majors last year with much fanfare, having already been a five-time All-Star and two-time MVP in Japan. The Rangers paid more than $107 million to get him for five seasons.
The 6-foot-5 righty quickly settled in with Texas, becoming an All-Star last year on the way to going 16-9 with 221 strikeouts. He also once flirted with perfection, retiring the first 17 batters at Kansas City on Sept. 3.
If Darvish had been able to finish the job Tuesday, it would have been the earliest perfecto in history.
He didn't really need a dazzling play from his defense as he shut down the Astros and chased the 24th perfect game in big league history - including the one Don Larsen tossed in the 1956 World Series, and two in 1880.
It was almost the second time in 10 months the overmatched Astros failed to put a runner on base. Cain's perfect game for the World Series champion San Francisco Giants came against Houston on June 13 last year.
Many expect the Astros to be the worst team in the majors this year, after two straight 100-loss seasons and a major league-low payroll of just under $22 million. But they cruised to an 8-2 win over Texas in the major league opener and their American League debut Sunday night.
The 26-year-old Darvish carried over a strong showing in spring training this year into near perfection in his first regular-season start. The Astros looked totally lost against him, often taking wild swings at breaking balls that bounced.
With the crowd on its feet and a mixture of cheers and "Yuuus" filling Minute Maid Park, Chris Carter took Darvish to a full count before striking out on the ninth pitch of the at-bat for the first out of the eighth inning.
Rick Ankiel followed by striking out and Justin Maxwell hit an easy grounder to second baseman Ian Kinsler.
Darvish looked toward the sky for a couple of seconds before retreating to the dugout.
He began the ninth by getting two easy groundouts before Gonzalez ruined his bid for perfection. The 24-year-old Gonzalez made his big league debut last year, hitting .234 in 80 games for Houston.
Darvish, who played seven professional seasons in Japan before joining the Rangers, set rookie franchise records for wins (16) and strikeouts (221) last season. He finished third in AL Rookie of the Year voting behind winner Mike Trout and Oakland outfielder Yoenis Cespedes.
The win gives Darvish five straight regular-season victories dating to last season. He took the loss in the Rangers' 5-1 defeat to Baltimore in the AL wild-card game last year.
Using his dizzying array of pitches, including a fastball that topped out at 97 mph, a slider, and 95 mph cutters, Darvish bedeviled the mostly inexperienced Houston hitters.
Darvish (1-0) sailed through the first four innings, striking out nine, including the side in the second and fourth.
Carter hit a long fly that looked as though it could be gone before David Murphy caught it just in front of the wall in left-center for the first out of the fifth. First baseman Mitch Moreland made a nice catch on a liner by Ankiel for the second out before Darvish fanned Maxwell on three pitches to end the inning.
Michael Kirkman relieved Darvish after Gonzalez's hit. Jose Altuve followed with a single before Kirkman fanned pinch-hitter J.D. Martinez to end it.
Darvish has never thrown a complete game in the majors.
Lucas Harrell (0-1), who was Houston's most successful starter a year ago with 11 wins, allowed six hits and one run with four strikeouts in six innings.
Lance Berkman had a run-scoring single in the third against his former team. He finished with three hits and two RBIs.
Kinsler hit a two-run homer off Rhiner Cruz in the seventh to make it 3-0. Texas added two runs in the eighth and two in the ninth.
NOTES: The last no-hitter by a Rangers pitcher was Kenny Rogers' perfect game against the Angels on July 28, 1994. ... Berkman extended his hitting streak at Minute Maid Park to 14 games dating to July 26, 2010. That includes his last three home games with the Astros and 11 appearances as an opposing player with St. Louis and Texas. ... These teams wrap up the series Wednesday when Humber makes his Astros debut against Texas RHP Alexi Ogando.