The main distinction between pergola and gazebo is the purpose of the roof. A gazebo and a pavilion give complete sun protection. However, a pergola allows sunlight to flow through its slatted top. Therefore, a pergola often offers partial cover and shade over a garden, walkway, or patio.