God establishes a covenant between Himself and Abram while simultaneously instituting the practice of circumcision in Genesis 17:3-14 (NJPS):
Abram threw himself on his face; and God spoke to him further, “As for Me, this is My covenant with you: You shall be the father of a multitude of nations. And you shall no longer be called Abram, but your name shall be Abraham, for I make you the father of a multitude of nations. I will make you exceedingly fertile, and make nations of you; and kings shall come forth from you. I will maintain My covenant between Me and you, and your offspring to come, as an everlasting covenant throughout the ages, to be God to you and to your offspring to come. I assign the land you sojourn in to you and your offspring to come, all the land of Canaan, as an everlasting holding. I will be their God.”
God further said to Abraham, “As for you, you and your offspring to come throughout the ages shall keep My covenant. Such shall be the covenant between Me and you and your offspring to follow which you shall keep: every male among you shall be circumcised. You shall circumcise the flesh of your foreskin, and that shall be the sign of the covenant between Me and you. And throughout the generations, every male among you shall be circumcised at the age of eight days. As for the homeborn slave and the one bought from an outsider who is not of your offspring, they must be circumcised, homeborn, and purchased alike. Thus shall My covenant be marked in your flesh as an everlasting pact. And if any male who is uncircumcised fails to circumcise the flesh of his foreskin, that person shall be cut off from his kin; he has broken My covenant.”
And in fact, a year later Abraham did have a son by Sarah. So it sounds like the act of circumcising his household allowed Abraham to be fertile even at the age of 99.
On the other hand, Abram had a son by Hagar when he was 86, and many times Genesis traces the source of Sarah's infertility to her own body. (See Genesis 11:30, for instance.)
So how should we read the close association between Abraham's fertility and his circumcision?