The poem is a part of Shakespeare’s dark lady sequence, in which a troubled relationship with a lady is described.
The poem’s theme, as expressed by the lines:
For, thou betraying me, I do betray
My nobler part to my gross body's treason;
flesh stays no father reason
is that of the difference between courtly love and lust. (It’s a very sexual poem).
It’s message in simple terms is that: if the lady is going down the path of lust, especially with some other man, then the poet certainly will go down the lustful path as well.
In fact the infidelity spurs him on to be even more lustful since courtly rules in any case have been thrown out the window.
See the below reference for more context on the dark lady series. It’s recommend that you read all of the poems in it together as a story about the relationship as a whole.