Yes, as a sign of respect, it's customary to cover your head. Most Gurudwaras provide scarves or cloths for visitors to use.