The two shared the first eight frames in Cardiff and a dramatic decider ebbed and flowed until Trump cleared the colours to book his place in the semi-finals.
The Bristol potter had a good early chance but missed a yellow with the rest after making 32. But Hawkins - winner of last week's World Grand Prix in Preston - responded with 30 before he missed a tricky red down the cushion.
World No 4 Trump again looked favourite when he fluked the final red after being snookered, but missed a straightforward yellow.
Hawkins then missed the same ball into the middle - when it wobbled on the lip of the pocket - to win the match and Trump took advantage with nerveless clearance to set up a semi-final clash with Scott Donaldson on Saturday.
"I am still in a bit of shock because I thought it was all over when I left him the yellow. He seemed to hit it well, but somehow it stayed out," Trump told worldsnooker.com.
"It is the bit of luck I've needed. I have played well the last few tournaments and gone out to amazing performances. For me to get a bit lucky today means the hard work has paid off.
"Every time I have lost I have gone back to the practice table the next day and that has really paid off for me now.
Scotland's Donaldson, 22, from Perth impressed in his first ranking quarter-final appearance as he whitewashed China's Zhou Yuelong 5-0.
"I have been playing a lot of TV matches recently and I think that helped me in the end," said the world No 77.
"There is no reason I've played better this week. That is snooker, sometimes you win, sometimes you lose and this week has been a good week for me, so long may it continue.
"I have been pleased for about a year now with my game, I can't pinpoint why, maybe it's confidence."
In the evening games, Robert Milkins beat Kurt Maflin 5-2, while Stuart Bingham resisted a brave fightback from Stuart Carrington to win 5-3 after being 4-0 ahead at the mid-session interval.