Clemens had a season-high nine strikeouts in seven sharp innings and left with a 5-1 lead. But Jeff DaVanon hit an RBI single and Eric Byrnes added a three-run homer off Chad Qualls in the eighth to tie it.
"This was tough," manager Phil Garner said. "We give them six runs the last two innings and that's tough, particularly after Roger pitched so well and things looked like they were on our side.
"It was another masterful game by Roger and we finally put some runs on the board. I really thought he had that one."
Clemens had perhaps his best game of the season, allowing two hits and one unearned run just five days before his 44th birthday.
The Astros had not scored a run while he was in the game in Clemens' four losses and were averaging a team-low 2.45 runs of support in his previous seven starts. But Clemens would not address any personal frustration afterward.
"There's not a whole lot to take from this game," said Clemens, who has a 2-4 record and lowered his ERA to 2.09, which would be the NL's best if he had enough innings to qualify. "The only positive I can take is the game calls that (catcher) Brad (Ausmus) and I had. It was probably in the top three or four games since I've been here for seeing hitters the same way and I was executing my pitches when he called them."
Ausmus shrugged off his role in Clemens' impressive performance.
"Things went pretty smoothly but the guy knows what he's doing," Ausmus said. "He was outstanding. His splitter was as good as it's been all year.
"This is just an awful loss. It doesn't get any worse."
The Diamondbacks were duly impressed with Clemens.
"He was great," Shawn Green said. "He had everything working. He was throwing strikes and he wasn't leaving any pitches over the heart of the plate. He's been pretty good for about 20 years but he definitely threw a good game. As he gets older, he just keeps adapting to what kind of pitches he has working."
Jackson hit a two-run homer off Lidge and Jorge Julio allowed Adam Everett's RBI double in the bottom half before finishing up for his 13th save.
Lidge has now given up seven home runs, two more than he allowed all of last season and just one short of his career high in 2004.
Lidge, whose ERA ballooned to 5.77, had no excuses.
"All losses are tough," he said. "But this is obviously frustrating after Roger threw such a great game.
"If you pitch at the end of the game, that's just part of it when you're struggling. You don't want to be struggling for our team now but I am doing that right now."
Ausmus doesn't know what Lidge's problem is.
"I don't know whether it's mental or physical," Ausmus said. "But it's got to get corrected. We need him to return to pitching the way he did last year."
Arizona manager Bob Melvin was amazed by his team's comeback.
"After Rocket did what he did to us and to come back to a position to where we're tied almost felt like a victory at the time," Melvin said. "Rocket really had us in his hand. He had unbelievable command of his fastball and a great split."
The Diamondbacks have won 10 of 15 games since the All-Star break and taken five of their last six series. Tony Pena (3-0) pitched one scoreless inning to get the win.
Trever Miller (0-3) got the loss, allowing one run in 1 1/3 innings.
Miguel Batista lasted six innings, allowing four runs and eight hits. He is 3-0 with four no-decisions since his last loss on June 20.
Chad Tracy doubled in Luis Gonzalez in the first inning to give Arizona a 1-0 lead. But Clemens settled down to retire 19 of the next 20 batters, including 10 straight from the fourth through the seventh innings.
Mike Lamb staked Clemens to a 2-1 lead with RBI singles in the first and third innings.
In the fourth, Clemens came up with Everett on third. Miguel Batista balked Everett in as Clemens and plate umpire Eric Cooper pointed to the mound simultaneously to signal the balk.
The Astros widened their lead in the seventh when Everett hit a bases-loaded grounder to third baseman Chad Tracy, who drew catcher Johnny Estrada off the plate with his wide throw home.
Brad Ausmus' suicide squeeze then drove in Luke Scott for a 5-1 lead.
- In the third inning, Houston's Craig Biggio was hit by a pitch for the seventh time this season. It stretched his modern Major League record for being hit by a pitch to 280.
- After hitting three batters all season, Batista plunked three more Sunday.