Despite coming away with a 1-1 draw from the first leg and securing a crucial away goal, Slaven Bilic's side failed to build on that result and suffered their first competitive defeat at London Stadium.
For the second consecutive year, the Romanian champions managed to knock the east London club out of the competition and it was bitterly disappointing that the Hammers failed to book their place in the draw for the group stage which will take on Friday.
Former West Brom midfielder Teixeira netted the crucial winner on 44 minutes and despite a battling display from the home side in the second half, they failed to find a way back into the game.
The night had started on such a positive note after new signing Edimilson Fernandes was introduced to the crowd just before kick-off.
The Hammers could have opened the scoring after just nine minutes when Reece Burke played the ball into Jonathan Calleri who only had the goalkeeper to beat but he saw his close-range shot kept out by the legs of Astra Giurgiu keeper Silviu Lung.
The home side continued to create the best openings and came close again on 15 minutes when Pedro Obiang fired a shot from the edge of the box which produced a fine save from Lung diving low to his left hand side.
Cheikhou Kouyate was the next Hammers player to come close on 32 minutes when Michail Antonio picked out the Senegal midfielder and he headed the ball just over the bar.
The Hammers were made to pay for those missed opportunities when Astra caught West Ham on the counter attack and opened the scoring on the stroke of half-time.
The ball fell to Teixeira and the former West Brom forward fired a left-foot shot into the corner of the net.
The home side tried everything to get back on level terms and Angelo Ogbonna saw his header well saved by Lung on 51 minutes.
The Astra keeper was having the game of his life and made another superb save to deny Calleri's close-range header on 54 minutes.
Just seconds later the Hammers had another great chance when Sam Byram's fierce cross was headed wide by Antonio.
You sensed it was not going to be West Ham's night and they missed another great chance on 61 minutes when Gokhan Tore's corner fell perfectly for Winston Reid but he directed his header inches past the post.
Having introduced Enner Valencia at half-time, Bilic used another attacking option from the bench in an attempt to turn the game around and Ashley Fletcher certainly impressed.
The summer signing from Manchester United almost made an immediate impact on 72 minutes when he picked up the ball from Ogbonna and saw his close-range effort kept out by the legs of Lung.
Antonio finally had the ball in the back of the net on 77 minutes but his effort was ruled out after the Hammers winger was adjudged to have committed a foul on the half-way line.
The Romanian side held on for another big victory against the east London Club and Bilic will be hoping his side can show an immediate response when they play Manchester City at the Etihad Stadium on Sunday.
West Ham United: Randolph; Byram, Reid, Ogbonna, Burke (Collins 88); Nordtveit (Valencia 45), Obiang, Kouyate; Tore, Calleri (Fletcher 60), Antonio
Subs not used: Adrian, Oxford, Browne, Diangana
Bookings: Reid, Collins, Antonio, Byram
Astra Giurgiu: Lung, Alves, Fabricio, Seto, Alibec, Morais (C), Lovin (Florea 87), Niculae (Oros 57), Sapunaru, Ionita (Stan 74), Teixeira
Subs not used: Gavrilas, Raileanu, Moise, Balaure
Bookings: Morais, Lung
Attendance: 56,932