Definitely better (and wiser) to decide on the tank dimensions according to what the fish require. As redchigh said, not all fish work in all tanks.
You mentino gourami and swords initially. For both, longer is better than higher, much better. Same with discus or angels, most characins, danio, barbs, catfish, loaches. Reason is that the length gives more surface area to the substrate, and shoaling fish like to swim, some more, some less, but length broken up with chunks of wood or rock (depending upon the fish's needs) and plants provides more of a stream effect which suits such fish. Territorial fish (discus, angels, gourami) need that length for other obvious reasons.
An extra foot in length makes a big difference. And you can safely have more fish in longer tanks (water quality is better). If you have the space for 4-feet, get the 55g. It is "narrow" front to back, but with some clever aquascaping this can be less obvious.