Pretty much, but it doesn't quite go that way.
You find a "how much can you afford" calculator. Banks and Real estate agents have them.
And then you go shopping for something lower than that amount (hopefully)
Some people go get approved at a bank first, some do it the other way around.
The sellers look up what has sold, and that is the price someone was able to afford, and so, it does get set by the bank, in a round about way.
RE: Banks Are Truly Evil. Let Me Show You How Evil