A great first-half offered everything except a goal - with both sides keen to get the ball down and play football.
The Frenchman finally broke the deadlock in a great sweeping move.
Paul Dixon dashed into space down the left wing before delivering a dangerous cross that the unmarked Andreu pounced on in the box with 22 minutes left.
Simon Murray had come closest for the Championship visitors in the opening 45 minutes, only to be denied by a fine stop from goalkeeper Cameron Belford.
At the other end, a fantastic dipping shot from Willie Gibson was tipped over the bar by Luis Zwick at full stretch.
Belford was in fine form, matching another well-placed shot from Murray right on the half-time whistle.
Good work in midfield from the League One side's Gibson and Kyle Turner creating lots of opportunities in the final third but ultimately few chances in the second half.
As the game continued at furious pace, both sides pushed hard to break the stalemate and on-loan Norwich City forward Andreu's decisive finish proved crucial.
Dundee United forward Tony Andreu: "It was a great cross, pin-point and I didn't even have to move.
"I was delighted with the header - I knew where I wanted it to go.
"I'm really enjoying my football here - the lads are great and I am very happy and confident here. I think Dundee United is perfect for me."
Tony Andreu' well-placed header against Stranraer took Dundee United through to the Scottish Challenge Cup quarter-finals by the slimmest of margins.