I think it depends on whether you're looking to sell your business, get an investor or simply value your company's outstanding shares for your own purposes. For the first two, see my answers below. For valuing your own shares, don't forget that if you pick a high price you'll pay more in taxes so there's really no need to go crazy here before you're making money.
--- The "scholarly" answer: ---
1. Estimate future earnings: Most traditional approaches to company valuation require knowing earnings over some period of time (for example, the Net Present Value Method often used by VCs). If there are no earnings yet, you're left to use your assumptions to estimate future income. This is not very reliable, especially if you're projecting income and growth over a period such as 5 years. Any final price arrived at by this method will likely need to be reduced (a lot) to account for risk.
2. Value your assets: First, add up the values of all your tangible assets (anything physical, like equipment). Second, estimate the values of your intangible assets (any nonphysical, such as your IP--trademarks, copyrights, etc). Intangible assets valuation can be tricky because, again, you're making estimates.
3. Use a comparable valuation: Look at the valuations of companies doing something similar (with regard to market, product, etc). Estimate your earnings and size over time and choose some companies to compare to based on it. I'll say it once more, though: when estimating earnings and growth, especially with no baseline, this can be very inaccurate. As a ridiculous example, say I'm building a social network, I project obscene growth and use Facebook for my comparable valuation. You can bet investors wouldn't buy into it.
Note: don't forget that investors (especially VC's) need to see a large ROI to account for the fact that most of their investments won't work out, so convincing someone that they'll see something like a 25X return based entirely on assumptions can be an uphill battle.
--- The "practical" answer: ---
Based on my talks I had with colleagues who seek out companies to invest in, I think that valuation can be very subjective. Most investors aren't nearly as interested in your idea or product as they are in you and your team, and your ability to pivot your business if you run into trouble. Some investors get excited about a product's potential reach and don't stick to any typical valuation formula; they bet on the entrepreneurs to find an income source later. As an example, look at MOOCs (Massive Open Online Courses), there the major players have millions in funding and yet are barely making a profit. The less of a commodity your product or service is, the more these things may apply to you. When you say your product has "amazing" potential, that's naturally a very subjective opinion, so your goal is to get your investor to see it (and you) that way. It also helps if your prototype is far along: are customers already using it? How much has it been refined based on feedback from your market? If not at all, this will harm any valuation because you haven't proven that customers love your product.
I think that if you're really on the brink of developing a profitable and high-quality product, take it as far as you can without selling of finding investment because you'll get a higher valuation the farther you get. Plus, you might make a lot of money and change your mind about selling so early, too!