In Infinity War, Black Widow notes that
Hawkeye and Ant-Man had both taken deals with the government after they were arrested (along with the rest of Captain America’s crew) in Captain America: Civil War. While Captain America, Falcon, Black Widow and Scarlet Witch presumably went into hiding, the two dads—Hawkeye and Ant-Man—turned themselves [in to] the government so they could be with their families.
Source: Time Magazine
The reason they were left out is to be revealed later - it was apparently quite intentional:
Anthony Russo: There is a very specific story choice why...
Joe Russo: There is a... we have a really interesting story cooked up for both of those characters, and part of that story required that they be under house arrest.
Source: originally from Happy Sad Confused podcast, quoted here.
Also realize that Ant-Man was probably off house arrest only a few days before everything went boom - it's not implied a ton of time passes between the main movie and the scene
where he gets stuck in the quantum realm.
Generally when you're dealing with a big angry Titan and Ragnarok, it's hard to keep track of when a guy gets off house arrest.
They probably also wanted to respect the whole family thing - their choice to make a deal with the government effectively said "we value family over this whole superhero gig" and they respected that.