Can Apple compete price-wise off contract? No, not unless you finance your phone though a store like Best Buy or are able to get financing through Apple (as I did with my i5). But on contract, Apple's prices are just as competitive as the competition. As others have said, most people subsidize phones, so it becomes a matter of aesthetic and appeal.
I completely agree with your comment. However, although the vast majority of people purchases their devices on-contract, I still think the iPhone does compete, price-wise off-contract. The off-contract price of the iPhone 5s is $649, for the 16GB version: this is comparable to the Galaxy S4, which is priced at $640. It is only undercut by the HTC One and LG G2, which both come in at $600, and the Moto X, which costs $550. Let's not forget, Apple is the only other OEM (besides HTC) to release a 64GB version of their flagship: although pricey, it is an option that really isn't available anywhere else.
The situation will be slightly (possibly dramatically) different, in different areas of the world.
In reply to Tre Lawrence:
I don't think Apple needs to create a "budget-priced," off-contract device, yet. Even with the Nexus devices offering a lot, at their price point, the majority of people still don't flock to them.
Apple has found its target market and caters to them well. Until the market decides that off-contract devices are the way to go, moving forward, then Apple has no reason to stray course. Just my opinion.