In this paper, we propose a new design of metamaterial and electromagnetic bandgap (EBG) structure based on double layers of metallic grids. Using finite integration technique, the electromagnetic properties of the grid structure have been investigated and this structure has been employed to enhance the performance of a patch antenna working at 11 GHz. The surface waves in the substrate of antenna have been suppressed by EBG behavior of the grid when used as a substrate, and it improves its gain to 9.21 dB from 5.64 dB. When this structure is also used as superstrate of the antenna, the gain up to 13 dB has been achieved due to its metamaterial behavior. Congregation effect of metamaterial provides a huge improvement in the directionality of the antenna and its half power beam width (HPBW) has been improved to 32.7° and 31.5° from 108.3° and 93.5° in E-and H-planes, respectively.