Jack Sparrow's Compass
Jack Sparrow's compass was useless as far as navigation is concerned. But it was still a good mathematical gadget. The compass always pointed towards the most desired object. In this way, the compass was still quite operative in a sense that it could still be used as a tool to measure distances. And compasses, when used as dividers, are useful in measuring distances, in particular on maps.
Doc Brown's Time Travelling Car
Doc Brown's stainless steel time-travelling car operated on plutonium and was quite a work of friction. Yet there was a careful mathematical computation behind every time travel. This precise computation enabled the movie characters to avoid disasters. Moreover, we learned that some gadgets can be more productive that others if we feed the appropriate sports statistics into it.
Will Smith's EXR (Movie Focus)
Though this was not a physical gadget but it was still a gadget in software form. Such mathematical gadgets are mostly developed using probability theory. However, there is one drawback with such a mathematical software. They are based on past data and may not be effective in case of changing environments.
Some Other Note Worthy Contribution of Mathematics to Movies
se7en shows how statistical data can help cops narrow down the list of suspects.