It seems to me that Blockchain.info just increments the id of blocks whenever it sees a new one. If that is the case, the id of a block on Blockchain.info would just be an arbitrary number and the only relation that it has to the block height would be id ≥ height.
This is so, because it is possible that more than one successor to a block is found at roughly the same time. If that happens all successors (usually not more than two) will have the same block height, and are competitors to build the chain with the most accumulated work, "the longest" or main chain. This conflict will be resolved, when one chain gains another successor, pulling ahead of its competitors.
However, Blockchain.info will still store the detached blocks, allowing the id to grow quicker than the block height.
Apparently, Blockchain.info gives an overview of blocks at the same height under the URL https://blockchain.info/block-height/<height>. There it lists the hash of the main chain block, which you could use to lookup the id.
How does blocktrail handle competing valid blocks then? Pick one, then reorganize when it is detached? – Murch – 2014-09-14T14:15:09.913
1yes, we reorg just like a normal node does. we do keep the old orphans around (and within the next week a UI adjustment will be made to display 'blocks at the same height' in a nice way). – Ruben de Vries – 2014-09-18T09:48:13.413