The major difference between a pergola and a gazebo is the function of the roof. While a gazebo and a pavilion offer full coverage from the sun, a pergola comes with a partial shelter that allows sunlight to come through its slatted roof.