There are also variant rumors. For some reason, this is often mentioned on Usenet.
Evidence is discussed below, but the short answer is that it's almost certainly true.
The Church of Scientology has actually taken German publishers to court for printing this story. One form of the rumor is that L. Ron Hubbard made a bar bet with Robert A. Heinlein. This is definitely not true. It's uncharacteristic of Heinlein, and there's no supporting evidence. Another variant is that Hubbard talked of starting a religion to avoid taxes.