OAKLAND — As good as the A’s have been, gaining ground on the Los Angeles Angels has proved to be quite problematic for them for nearly two weeks now.

Oakland hasn’t picked up a full game on the Angels since July 8, when they upped their American League West lead to 4 ½ games after a win over the Giants. Since then, L.A. has been hovering at 1 ½ games behind before a loss on the A’s off day Monday made it a two-game deficit.

The A’s had a great opportunity to make it three Tuesday night after the Angels suffered a 4-2 home loss to Baltimore, but Houston’s L.J. Hoes spoiled the chance to widen the gap. Hoes’ 12th inning first-pitch solo homer off Fernando Abad gave the Astros a rare 3-2 win at the Coliseum before 22,908.

It was a missed chance for Oakland, but the A’s will have more opportunities coming on the horizon. The opening game against the Astros marked a stretch where Oakland plays 20 straight games against teams with sub-.500 records while the Angels must contend with the Orioles, the Detroit Tigers, the Los Angeles Dodgers and the rejuvenated Tampa Bay Rays and Boston Red Sox over the same stretch.

That said, the Astros clearly aren’t a team that’s just going to roll over anymore for the A’s, who were 25-7 against Houston all-time before this defeat.

“Very improved, especially in games like this,” said A’s starter Scott Kazmir, a Houston native. “It shows signs of a good team to be able to pull out close games.”

Kazmir certainly did his part for the A’s once again, allowing just two runs and only one earned over seven innings while walking one and striking out six. He wound up with a no-decision, however, as the Astros team — who won for just the fourth time ever in 17 games at the Coliseum — simply wouldn’t got away.

A’s relievers Luke Gregerson, Sean Doolittle, Dan Otero and Abad kept it at 2-2 through the 11th, but Hoes — who came into the game hitting just .176 — launched his third homer over the left field wall against Abad (2-4) with one out in the 12th.

“It was a fastball away that cut over the middle of the plate,” said catcher John Jaso. “He did what he was supposed to do with a pitch like that. But there were some balls that were hit hard that didn’t carry as well as that one did. I thought it was just going to hit it off the wall. I don’t know if the wind changed or what.”

The Hoes blast ended a rather dull affair in which the A’s had plenty of opportunities to break it open against Astros starter Brett Oberholtzer but couldn’t come up with the big hit. Oberholtzer matched Kazmir by allowing just two runs over seven innings even though he didn’t strike a batter, and then it became a battle of the bullpens.

A’s manager Bob Melvin maintained Houston got a crucial break early in the game when the Astros struck for two runs in the third inning. After No. 9 hitter Marwin Gonzalez opened the inning with a single to right, major league hits leader Jose Altuve hit a one-hop shot off of Kazmir, and the runners moved up to second and third on a Josh Donaldson throwing error. Both scored on a subsequent Chris Carter single.

But the A’s thought Altuve ran inside the baseline as he tried to beat Donaldson’s throw, which was wide of the bag.

“No question for me he was on the grass,” Melvin said. “(The umpires) said they didn’t think it affected from where J.D. threw it, but it did. The ball was up the line and (first baseman Nate) Freiman had to go get it. It looked like he was inside the line, and in my opinion should have been called out.”

Melvin spoke to disgruntled pitcher Tommy Milone by phone Monday and said that left-hander hadn’t softened his stance about wanting to be traded if Oakland can’t find a spot for him on the major league roster.

“I don’t think there’s any softening to it,” Melvin said. “I think he just wants to pitch in the big leagues. He’d much rather do it (with Oakland), but when you’ve had the type of success he’s had and you’re pitching in the minor leagues, that’s not somewhere he wants to be.”

Josh Reddick was activated from the disabled list, and even though he wasn’t in the lineup, he entered the game as a pinch-hitter and wound up going 0 for 2 with a strikeout.

Reddick said he will wear a brace on his right knee for the rest of the season.

“It’s very uncomfortable, but as the game goes on, you get used to it,” he said. “But it doesn’t restrict me in any way possible. It’s definitely not going to slow me down.”

The A’s and the City of Oakland officially agreed on a 10-year lease agreement. The lease still must be voted on by the Alameda County Board of Supervisors June 29, but that is considered a formality. For complete details on the lease agreement, go to www.mercurynews.com.

(Click here if you are unable to view this photo gallery on your mobile device) The Ruth Bancroft Garden in Walnut Creek celebrates the life of its founder Ruth Bancroft who died at 109 on November 26, 2017. The Ruth Bancroft Garden is a nonprofit public dry garden that was planted by Mrs. Ruth Bancroft in 1972 and was opened to the...