Tunneling of electromagnetic waves through a barrier with a periodic structure