Please read the verse in context: The Jews are leaving the camp every day to gather manna. They're told that there will be no manna on Shabbat, gather double on Friday. "Everyone should stay in their place on Shabbat." I.e. don't gather manna!
The Talmud says this means two things: A.] Don't carry in a public thoroughfare. B.] Don't walk far beyond the inhabited city limits.
Note that you could walk ten miles, with empty pockets, in many big cities today while staying in the inhabited limits, and thus not violating anything.
The rule of thumb is that Shabbat violation is a sufficiently-serious problem that no mitzva overrides it unless explicitly mentioned. Saving a life overrides any issue of Shabbat, and hence the Talmud talks about people leaving the city limits to put out a fire, fight off bad guys, rescue people from a flood or a collapse, or deliver a baby.
But if the only way for me to get to synagogue is to carry or go beyond the inhabited city limits (or drive, for that matter), "don't break Shabbat" comes first. I should pray at home. (Or anywhere else in my town.)
Circumcising a baby is an interesting one as if a baby is born conventionally on Shabbat, his circumcision is held the next Shabbat (even though normally, elective surgery is a prohibited on Shabbat). (The Torah spells out explicitly that the daily sacrifices override Shabbat, and uses similar language regarding circumcision.) Yet the only prohibitions overridden are those that could not in any way (even theoretically) have been done before Shabbat, such as the actual cutting. If the baby is a hundred miles from the nearest mohel, you may not drive or carry the baby on Shabbat as theoretically (even if it was impractical for any sort of reason, e.g. the doctors wouldn't let him out of the hospital) that could have been done on Friday. The circumcision would instead be postponed to Sunday.