Viral gastroenteritis is a serious viral infection which affects a large number of individuals around the world, most of them being children. The infection may occur due to different viruses, for example, coxsackievirus, adenovirus, and rotavirus. There is no available cure for such infections, and the treatment mainly depends on hospitalization and administration of nutritional supports. A new antiviral agent against gastroenteritis viral infection will be a breakthrough in healthcare. Pyrrole and pyrrolopyrimidine derivatives are well known for their biological activity as antibacterial, antifungal, and anticancer agents. These compounds also proved to possess antiviral activity. Here, we synthesized novel pyrrole and pyrrolopyrimidine compounds and examined their antiviral activity. We synthesized several new pyrrole, pyrrolo[2,3-d]pyrimidine, and pyrrolo[3,2-e][1,2,4]triazolo[1,5-c]pyrimidine derivatives. The characterization of all synthesized compounds was based on microanalysis and spectral data. Moreover, we determined the non-toxic doses of these compounds on BGM, Hep-2, and MA-104 cells. We tested all the synthesized compounds for their antiviral activities against coxsackievirus B4, adenovirus type 7, and rotavirus Wa strain. Several compounds exhibited significant activities as antiviral agents.