In general, there are similarities but also notable variations. The movie had to make some changes for cinematic purposes and to appeal to a wider audience.
Infinity Wars features a large number of comic book characters. Ranging from familiar faces like Iron Man and Captain America to more obscure ones. The sheer quantity adds to the grand scale and excitement of the storyline.
In the Infinity Wars comic, Spider-Man's fate is sealed when Thanos uses the Infinity Gauntlet to wipe out half of all life. Poor Spidey doesn't stand a chance against such cosmic power.