Mastani Bai is generally considered to be daughter of Raja Chattrasal born from his Persian concubine although her origins are disputed. After Peshwa Bajirao helped Raja Chattrasal against Nizam, it's said that he gave a region of Bundelkhand to Peshwa along with his daughter Mastani Bai.
Peshwas usually were monogamous and therefore the second marriage of Peshwa Bajirao deeply concerned his family, more so after he started drinking alcohol and consuming non vegetarian food, his family blamed it all on Mastani. Whether Mastani was really responsible for his downfall is not clearly mentioned anywhere but his family blamed her for that and even she was house arrested.
Peshwa Bajirao’s first wife was Kashibai and she was the only wife considered legitimate by his family and relatives. Bajirao himself never abandoned or neglected Kashibai as much as shown in the movie. Bajirao and Mastani had a son named Krishna Rao renamed as Shamsher Bahadur and Kashibai was the one who brought him up after his parents died like her own son. Shamsher Bahadur fought in Third Battle of Panipat and attained martyrdom.