A crude tackle just inside the box led to the spot-kick and although the Tanzanian goalkeeper correctly guessed the direction of the penalty, it was too hard and high for him to stop.
Captain Wanyama equalised close to half-time and six minutes after Elias Maguli had put the visitors head at Moi International Sports Centre stadium in Nairobi.
Recently appointed Kenya coach Stanley Okumbi gets another chance on Tuesday to record his first win when the Harambee Stars host Sudan in another warm-up.
Tanzania are at home to Egypt next weekend needing either a 3-0 victory or a four-goal winning margin to retain a chance of qualifying for the Cup of Nations in Gabon.
Kenya, bottom of another group with just one point from four qualifiers, remain in Nairobi to play Congo Brazzaville.
There are two friendlies on Monday involving African national teams with Egypt meeting the Democratic Republic of Congo in Borg El Arab and Cameroon facing Euro 2016 hosts France in Nantes.