Not reliably. There are any number of supposedly "good" movies that bomb at the box office. And people will go to see crap in droves in many instances.
But it's amazing how seldom Hollywood is willing to step outside it's usual formulas.
The problem is that there is no formula for "good movie". There is a formula for "movie that generally sells a lot of tickets". If you *aren't* working by formula, then you don't know if the result will be crap or not before you make it.
Let us compare two movies, in roughly the same genre. According to Box Office Mojo, they were in theaters for about the same amount of time (18-19 weeks), within about a year of each other, so there's not a lot of inflation or economic change between them
Movie A ran at 78% on the Tomatometer. So, generally, we can say it was an okay film. It cost $200 million to make, and grossed $1,200 million at the box office. That means $1 billion in profit, and a 5x return on investment!
Movie B ran at 85% on the Tomatometer. So, we could say that it is at least as good, if not better, than Movie A. It ran in about half the theaters, though, so we should expect half the gross. But, instead, it only made $126 million at the box office - half the theaters, but only 10% of the gross!
So, clearly, how good the movie is by no means determines ticket sales!
In reality, the saving grace of Movie B was it's low production costs: Movie B only took $12 Million to make, and so made nearly a 10x return on investment! You'd think that the rational choice is for the studio to make a whole lot of things like Movie B, and skip on Movie A. But Movie A was pretty clearly a sure thing to do well, while Movie B was not nearly so close to formula. If you made Movie B2, and it flopped, maybe the combination would only be a 5x. If they kept at it, and made a B3, and it flopped, the return ratio for the trio might be even lower. It is not irrational to take a 5x sure thing over a several 10x risks.
For the curious: Movie A is Iron Man 3. Movie B is Chronicle.