The only way this would have happened would have been between Britain, Canada, Australia and New Zealand. South Africa wasn't an option at the time and the rest of the colonies didn't meet the culture/social/political norms to federate with the Britain of the 1870s. You certainly wouldn't have seen it happening with India or the African colonies.
Easiest point of departure is bring to power some kind of Prime Minister who believed in this idea, although few mainstream politicians did, so that would be a big problem. The various Canadian, Australian and New Zealand governments would probably have agreed with such a proposal considering their own nationalism was very nascent in the 1870s. Even in 1914 massive chunks of their populations were British born or first generation Canadians/Australians etc. It was only really the Great War that kickstarted their own indigenous nationalism.
If you did manage to find a politician you could insert into the timeline then you have logistical issues. Worldwide telegraphy was only just starting to develop and while the UK-USA/Canada journey times were lowering and more than doable (considering California sent politicians to Washington when it took them as long to arrive) the UK-Australia/New Zealand travel times were still pretty hefty. Plus the British were always more laissez-faire about their colonies than say the French, who were very much into federalism and 'one France' rather than 'France and the colonies'.
Actually the more I think about it, the more I think that 1901 would have been the prime time. Logistics and communications have grown a fair deal more and when Victoria dies you can have a British PM suggest an Imperial Federation both in honour of her, bringing together all our various subject peoples and as a legitimate defence against the growing powers of Germany, Japan and the United States. Likewise in 1901, nationalism in the White Commonwealth was still rather nascent and the Brits/Canadians/Antipodeans had recently fought successfully together in South Africa forming a decent bond. Likewise Ireland wasn't on the edge of outright civil war like it was in 1914. You'd need to somehow alter the timeline to get a pro-federation PM in place for 1901 but it seems like the best date for me. Especially as Victoria's funeral in London was a rare occasion where all the political leaders would have been in one place to discuss such a thing. Still would have been just Britain, Canada, Australia and New Zealand though.