WARNING: The following contains extremely major big-time spoilers for Ant-Man and the Wasp. It is meant for people to read after they've seen the movie (which is out today) and also contains major spoilers for Avengers: Infinity War, the highest grossing movie of the year. Please be advised.
Ant-Man and the Wasp was definitely Marvel's palate cleanser following the heaviness of Avengers: Infinity War. Not only was A-M and the W full of great comedy and exciting but fairly benign action, there wasn't even really a major villain, with Hannah John-Kamen's Ghost ending up incredibly sympathetic and Walton Goggins' black market tech dealer Sonny Burch little more than an obstacle. It was just a fun time at the movies!
And then there's the mid-credit sequence.
Last chance to abandon ship before the spoiler iceberg hits.
The entirety of Ant-Man and the Wasp, more or less, takes place before the events of Avengers: Infinity War. They make mention in Infinity War of Scott Lang (Paul Rudd) being under house arrest, which he is up until the very ending of the A-Man and the Dub, so at the very least, Infinity War starts in the final day or so of the next movie.
However, the mid-credit sequence is very firmly within the Infinity War and sets up how the characters from Anty Waspy fit into Avengers 4. Scott gets sent into the quantum realm in the Ant-Man suit in order to obtain energy to help cure Ghost. The newly freed Janet Van Dyne (Michelle Pfeiffer) explains he needs to be careful, because he could get caught in a time vortex and then he'd never get out.
Scott shrinks and heads into the quantum realm and makes a little joke about being missing, but then the scene shifts to Scott's point of view inside the realm, he gets the energy he needs and is ready to come back, but... yep, you guessed it: Janet, Hope (Evangeline Lilly), and Hank (Michael Douglas) got dusted, leaving Scott Lang alone, trapped, in the quantum realm, with no way of getting out.
Except, surely he'll get out, probably through that time vortex Janet mentioned. How do I know that? Because why else would she specifically say "time vortex" if it wasn't for that purpose? It's Chekhov's Plot Contrivance. And naturally, a quantum realm-hopping size-shifter could come in handy in resetting the events of the Snappening. So, fear not friends, Scott Lang will for sure be in the next Avengers movie. (Also everyone will except Loki and probably Heimdall.)
And the after-credit scene in Ant-Man and the Wasp just has an oblivious human-sized ant playing drums while the television news channels all show the test pattern due to half the population of the Earth getting turned to ash. Fun and cute.
So that's how Ant-Man and the Wasp fits into the Infinity War timeline and beyond. Let us know your thoughts about it and other Marvel stuff in the comments below!