Close tab without clicking on X?
The middle click to close tab functionality isn't really a common OS X UI pattern. The standard keyboard shortcut for closing a tab is command ⌘W (which will also close non-tabbed windows, or windows with only one open tab).

If you really want a Magic Trackpad gesture for closing tabs, you could use BetterTouchTool to map a gesture to ⌘W, but it would still be a bit limited, in that it would only close the currently active tab. I suppose you could use a combination of programs to make a macro that would perform a click to switch to the tab under your mouse, then close it, but it's still a bit hacky.