My phalaris plants had a horrible issue with fungus gnats a while back as well. They were originally outside, but I brought them in and noticed gnats everywhere shortly after.
At first I tried watering with neem oil, and it worked a little, but the gnats were still around. So then I added some yellow sticky traps, which caught dozens of gnats, but this too did not get rid of them completely.
So I decided I needed to go all out.
To finally get rid of the gnats I watered with hydrogen peroxide (1 part 3% hydrogen peroxide and 4 parts water), added several yellow sticky traps to each plant, and added a 1-2cm layer of fine sand to the top of the soil. After adding the sand I dusted each plant with some diatomaceous earth. Then I would water with neem oil weekly. After about 2 months I stopped seeing gnats everywhere.
Once the gnats left I stopped watering with neem oil and added some mycorrhizal fungi to the plants. They are all looking good now and doing fine.
Best of luck with getting rid of those gnats