The Gospel ends with the encouragement from Jesus to be perfect as our Father in Heaven is perfect. Perfection in the spiritual life can seem like an intimidating prospect. However, perfection in the spiritual life is simple. We simply need to love as our Father in Heaven loves. It is a love that we participate in - not a love we accomplish on our own.
We often think of perfection in terms of individual accomplishment - especially in sports. A person can bowl a perfect game if he or she knocks down all pins or pitch a perfect baseball game when he strikes out every batter. However, the perfection that Jesus is talking about is a perfection that is not an individual accomplishment but is a perfection that is achieved through cooperation. It is more like a violinist playing in perfect harmony with an orchestra or the passing brilliance of the 1986 Boston Celtics (worthy of a YouTube search!). Human perfection is achieved when we live in perfect harmony with the will of God.
The first step to living in perfect harmony with the will of God is to not sin. Don't live your life out of tune. Do not play the wrong notes. It is possible to live a terrible sounding life of sin. However, simply avoiding sin does not make one perfect. Perfection comes when we love others as Jesus loved others. Perfection comes when we love our enemies, when we do not let those we disagree with steal our peace, when we are in such harmony with God that we love both those we consider good and those we consider evil. Jesus invites us to live a perfect life if we are willing to participate in the Spirit of Love which He shares with His Father.