Their reward is a place in Pool A with hosts France, New Zealand, Italy and Uruguay at the tournament in September next year.
The Namibians were favoured to advance after beating Burkina Faso 71-5 in the quarter-finals last week and two-time World Cup side Zimbabwe 34-19 in the semis on Wednesday.
The Welwitschias hadn't lost to Kenya in eight years, winning the last five contests, and not scoring less than 45.
Flanker Wian Conradie scored a hat-trick of tries on Sunday and captain Johan Deysel the other in the final of the African qualifying tournament, played at the Stade Maurice David in the south of France.
Five-eighth Cliven Loubser added four penalties and a conversion, with substitute PW Steenkamp adding another conversion to deny Kenya a first ever qualification.
Namibia have competed at every World Cup since the 1999 tournament but lost all 22 matches they have played in the finals.
Their opener will be against Italy on September 9, 2023 in Saint-Etienne followed by a clash six days later with the All Blacks in Toulouse.
Kenya, yet to play in a World Cup, remain alive in qualifying by making the four-team repechage tournament in November.