The visitors started the game strongly and Shkelzen Gashi should have done better to get his header on target when he latched onto Nzuzi Toko's cross.
Fiorentina hit back through Nenad Tomovic, who saw his low effort from the edge of the penalty area saved by Roman Burki, who got down low to his left.
Just before the break, Grasshoppers took the lead through Nassim Ben Khalifa as he found the bottom corner of the net with a low right-footed drive from inside the box.
After half-time, the visitors upped the ante again and Neto had to make a good save to keep his side ahead in the tie as he denied Anatole Ngamuko.
Borja Valero and David Pizarro almost combined to find an equaliser from the home side but the former Manchester City's low drive was saved by Burki.
Grasshoppers kept pushing forward late on searching for the extra away goal they needed to go ahead in the tie but Izet Hajrovic put two efforts over the bar when well placed outside the area, as Fiorentina sealed their place in the group stages.