Shakespeare's primary meter through all of the sonnets is iambic pentameter. Each iambic "foot" is made up of one unstressed syllable followed by one stressed syllable. In a perfect line of iambic pentameter, there would be 5 iambic feet. In the section of the poem in your question I will use bold lettering to note the stressed syllable.
I grant I never saw a goddess go:
my mistress, when she walks ,treads on the ground .
and yet, by heaven, I think my love as rare
as any she belied with false compare.
When you look at the words or syllables of words that are bolded you can notice that sometimes there are sound connections within those words. Shakespeare used alliteration, assonance and consonance to further connect the words within a line. For example, in the first line above, 3 of the bolded syllables START with a "g" which is an example of alliteration. The vowel sound of "saw" and "god" both have the "a" sound which is an example of assonance. The last line above repeats the "l" sound in "belied" and "false" which is an example of consonance. It is clear that Shakespeare was intentionally creating some masterful poetry with these lines, and in all of his writing.