Williams, 35, made the announcement on Reddit.com in a poem that said Ohanian, 33, proposed in Rome, the place "where our stars first collided."
The poem goes on to say: "At the same table we first met by chance. But by choice. Down on knee. He said 4 words. And I said yes."
The couple have been dating since 2015, but have been discreet about their relationship, according to news reports.
Williams has won 22 grand slam singles titles, 14 in women's doubles playing with her sister, Venus, and numerous other tournaments as well as honours for an athletic career spanning more than 20 years.
Along with co-founding Reddit, Ohanian is the author of "Without Their Permission."