Mediates bacterial resistance to kanamycin, gentamicin, dibekacin, sisomicin, neomycin and tobramycin by adenylating the 2''-hydroxyl group of these antibiotics. nucleoside triphosphate + gentamicin = diphosphate + 2''-nucleotidylgentamicin. Binds 2 Mg(2+).