The 23-year-old, who was adjudged the club's best performer for the 2017 season in the Kazakhstan Premier League, assisted his side's opener and later found the back of the net in 88th minute but his effort was too little too late to at least salvage a point.
Congo DR international Junior Kabananga opened the scoring for Astana by the 22nd minute when he was played through by Twumasi before Daniel Raba pulled even for the visitors on 37th minute.
After the break, Villarreal took control of the game and made their dominance count as they took a 3-1 lead thanks to a brace from substitute Cedric Bakambu.
The Congo DR striker shot the Yellow Submarine in front for the first time in the game on 65th minute, just five minutes after coming on, when he connected a pass from Nicola Sansone before slotting in another fine effort on 83rd minute.
With two minutes to end proceedings, Twumasi finished off a pass from Igor Shitov to make it 3-2 and set an epic ending to the game. However, despite Astana pushing men forward for the priceless goal in additional time, Villarreal were resolute at the back and did not allow the hosts to find a breach.
Astana now sit third on the log with seven points, four behind Villarreal, who have picked their tickets to the knockout stage of the competition with a game to spare. Twumasi's side must now win their last away game against Slavia Praha on December 7.