The function you are looking for is DataView.getTableRowIndex(), which traces the row back to the datatable (the visualization gets a view of the datatable).
var selection = table.getChart().getSelection();
if (selection.length > 0) {
var rowAtVisualization = selection[0].row;
var originalRow = table.getDataTable().getTableRowIndex(rowAtVisualization);
alert("Row "+originalRow);
}
}
There is another issue that needs a bit of a workaround - the table visualization maintains the selected rows even when the data is changed. This does not really make sense on your scenario. To avoid this behavior you can reset the selection after each redraw:
google.visualization.events.addListener(table, 'ready', function () {
table.getChart().setSelection([]);
});
HTH.